Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ verify_ssl = true
name = "pypi"

[packages]
docker = "~=3.7"
docker = "*"
graphviz = "*"

[dev-packages]

[requires]
python_version = "3.9"
python_version = "3.10"
4 changes: 2 additions & 2 deletions docker-net-graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import typing
from dataclasses import dataclass
from graphviz import Graph
from graphviz.backend import FORMATS
from graphviz import FORMATS

# colorlover.scales["12"]["qual"]["Paired"] converted to hex strings
COLORS = ["#1f78b4", "#33a02c", "#e31a1c", "#ff7f00", "#6a3d9a", "#b15928", "#a6cee3", "#b2df8a", "#fdbf6f",
Expand Down Expand Up @@ -64,7 +64,7 @@ def get_networks(client: docker.DockerClient, verbose: bool) -> typing.Dict[str,
for net in sorted(client.networks.list(), key=lambda k: k.name):
try:
gateway = net.attrs["IPAM"]["Config"][0]["Subnet"]
except (KeyError, IndexError):
except (KeyError, IndexError, TypeError):
# This network doesn't seem to be used, skip it
continue

Expand Down