diff --git a/docker-net-graph.py b/docker-net-graph.py index bd0cab8..3852f9b 100755 --- a/docker-net-graph.py +++ b/docker-net-graph.py @@ -61,7 +61,7 @@ def generate_graph(verbose: bool, file: str): try: gateway = net['IPAM']['Config'][0]['Gateway'] - except KeyError: + except (KeyError, IndexError): # This network doesn't seem to be used, skip it continue