Fix IndexError on unconfigured networks
This commit is contained in:
parent
3586b9f0c9
commit
4390b6da78
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ def generate_graph(verbose: bool, file: str):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gateway = net['IPAM']['Config'][0]['Gateway']
|
gateway = net['IPAM']['Config'][0]['Gateway']
|
||||||
except KeyError:
|
except (KeyError, IndexError):
|
||||||
# This network doesn't seem to be used, skip it
|
# This network doesn't seem to be used, skip it
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue