summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-07 07:51:10 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-04-07 05:57:47 +0000
commit27234693f4ad44e38325950cbd978bf832c0b221 (patch)
tree75ee243070af92930bbe48324eed05295c0d37c0 /src
parentc5cda0934df4c6ec3e5b368a907bbda04ffa359f (diff)
downloadvyos-1x-27234693f4ad44e38325950cbd978bf832c0b221.tar.gz
vyos-1x-27234693f4ad44e38325950cbd978bf832c0b221.zip
container: T6208: fix AttributeError: 'ConfigDict' object has no attribute 'upper'
Commit b30faa43c (container: T6208: rename "cap-add" CLI node to "capability") added an AttributeError referencing an out of scope variable. This has been fixed. (cherry picked from commit 2463bd292f14e46fdb26116791a89ca2eb651d17)
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 abd2c5f21..0b57221b2 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -265,7 +265,7 @@ def generate_run_arguments(name, container_config):
capabilities = ''
if 'capability' in container_config:
for cap in container_config['capability']:
- cap = c.upper().replace('-', '_')
+ cap = cap.upper().replace('-', '_')
capabilities += f' --cap-add={cap}'
# Add a host device to the container /dev/x:/dev/x