diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-24 13:47:27 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-12-28 15:09:10 +0100 |
commit | 02bb7e09e1bbf3c5e2184c1332bda4652a9f4a93 (patch) | |
tree | ac45ad2f2935d6e6911173015389bb9fb307b639 /src | |
parent | 410d66f5f087f50972781224404eb060609f5a09 (diff) | |
download | vyos-1x-02bb7e09e1bbf3c5e2184c1332bda4652a9f4a93.tar.gz vyos-1x-02bb7e09e1bbf3c5e2184c1332bda4652a9f4a93.zip |
container: T5829: fix base key "container" re-use in for loop
(cherry picked from commit 405cc66041d8035500f7b7116301983c48464a9b)
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/container.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py index f1bd018c1..53e25f422 100755 --- a/src/conf_mode/container.py +++ b/src/conf_mode/container.py @@ -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(): |