summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-06-28 18:28:30 +0200
committerGitHub <noreply@github.com>2022-06-28 18:28:30 +0200
commit2e8fdce2a94768f82758487336f6a46ab5b20ad6 (patch)
treeb88a697767fa3e7c05d6b037270cc0b261c4326a /src
parentd1ff009703bbe8ce65be79e0ced06881068ba9a1 (diff)
parent1e645f7a567178a0af444a08e87987eeaed557c5 (diff)
downloadvyos-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
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/container.py2
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]: