summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-04-01 14:42:45 +0200
committerChristian Breunig <christian@breunig.cc>2023-04-01 14:44:51 +0200
commit39c8d271b388588905e2a0584fafe180b2c76d9a (patch)
tree4405e95922127f00517d1174681f2f723c1ae86d /src/conf_mode
parent6f81d7ab1fe3f7ae794dd2b1d55533890b0db6a9 (diff)
downloadvyos-1x-39c8d271b388588905e2a0584fafe180b2c76d9a.tar.gz
vyos-1x-39c8d271b388588905e2a0584fafe180b2c76d9a.zip
container: T5047: bugfix TypeError: argument of type 'NoneType' is not iterable
Commit 52e51ffb ("container: T5047: restart only containers that changed") started to iterate over a NoneType which is invalid. This happened when a network description was changed but no container was due for restart. (cherry picked from commit 86d7b8d1d2b53b9fa93bd456abb4ea1b4f2949b6)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/container.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index 53e577310..50c3424d2 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -423,7 +423,8 @@ def apply(container):
os.unlink(file_path)
continue
- if name in dict_search('container_restart', container):
+ tmp = dict_search('container_restart', container)
+ if tmp and name in tmp:
cmd(f'systemctl restart vyos-container-{name}.service')
if disabled_new: