summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhramshinr <khramshinr@gmail.com>2025-02-05 12:29:05 +0700
committerkhramshinr <khramshinr@gmail.com>2025-02-07 11:02:51 +0700
commite47feb25a640b469623cfed26e1e4403d82adfa3 (patch)
treead45e052db56c91bd0201bc4c1dd51ff886c2734
parentc1cd7b4a7665f29ffcbe22d8450abaa759932242 (diff)
downloadvyos-1x-e47feb25a640b469623cfed26e1e4403d82adfa3.tar.gz
vyos-1x-e47feb25a640b469623cfed26e1e4403d82adfa3.zip
T6058: Fix popen command wrapper handling
Ensure `wrapper` is only prepended to `command` when it is non-empty
-rw-r--r--python/vyos/utils/process.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/utils/process.py b/python/vyos/utils/process.py
index 054088325..121b6e240 100644
--- a/python/vyos/utils/process.py
+++ b/python/vyos/utils/process.py
@@ -83,7 +83,7 @@ def popen(command, flag='', shell=None, input=None, timeout=None, env=None,
)
wrapper = get_wrapper(vrf, netns, auth)
- command = f'{wrapper} {command}'
+ command = f'{wrapper} {command}' if wrapper else command
cmd_msg = f"cmd '{command}'"
debug.message(cmd_msg, flag)