Skip to content

KeyError: 'Gateway' #199

Description

@srdjan0
File "/home/srdjan/.local/pipx/venvs/tox/lib/python3.13/site-packages/tox_docker/plugin.py", line 53, in get_gateway_ip
    ip = container.attrs["NetworkSettings"]["Gateway"] or "0.0.0.0"
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'Gateway'

Not sure what/when populates NetworkSettings, and why are we sure that Gateway should be there. Maybe container.attrs["NetworkSettings"].get("Gateway", "0.0.0.0") ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions