Skip to content

Commit

Permalink
container: T5829: fix base key "container" re-use in for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
c-po committed Dec 28, 2023
1 parent e70ca62 commit 405cc66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/conf_mode/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def verify(container):
# A network attached to a container can not be deleted
if {'network_remove', 'name'} <= set(container):
for network in container['network_remove']:
for container, container_config in container['name'].items():
if 'network' in container_config and network in container_config['network']:
raise ConfigError(f'Can not remove network "{network}", used by container "{container}"!')
for c, c_config in container['name'].items():
if 'network' in c_config and network in c_config['network']:
raise ConfigError(f'Can not remove network "{network}", used by container "{c}"!')

if 'registry' in container:
for registry, registry_config in container['registry'].items():
Expand Down

0 comments on commit 405cc66

Please sign in to comment.