diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-06-28 18:28:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 18:28:30 +0200 |
commit | 2e8fdce2a94768f82758487336f6a46ab5b20ad6 (patch) | |
tree | b88a697767fa3e7c05d6b037270cc0b261c4326a | |
parent | d1ff009703bbe8ce65be79e0ced06881068ba9a1 (diff) | |
parent | 1e645f7a567178a0af444a08e87987eeaed557c5 (diff) | |
download | vyos-1x-2e8fdce2a94768f82758487336f6a46ab5b20ad6.tar.gz vyos-1x-2e8fdce2a94768f82758487336f6a46ab5b20ad6.zip |
Merge pull request #1376 from sever-sever/T4473
containers: T4473: Fix create container with not exist network
-rwxr-xr-x | src/conf_mode/container.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py index 77281eb4d..ac3dc536b 100755 --- a/src/conf_mode/container.py +++ b/src/conf_mode/container.py @@ -132,7 +132,7 @@ def verify(container): # Check if the specified container network exists network_name = list(container_config['network'])[0] - if network_name not in container['network']: + if network_name not in container.get('network', {}): raise ConfigError(f'Container network "{network_name}" does not exist!') if 'address' in container_config['network'][network_name]: |