diff options
author | khramshinr <khramshinr@gmail.com> | 2025-02-05 12:29:05 +0700 |
---|---|---|
committer | khramshinr <khramshinr@gmail.com> | 2025-02-07 11:02:51 +0700 |
commit | e47feb25a640b469623cfed26e1e4403d82adfa3 (patch) | |
tree | ad45e052db56c91bd0201bc4c1dd51ff886c2734 | |
parent | c1cd7b4a7665f29ffcbe22d8450abaa759932242 (diff) | |
download | vyos-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.py | 2 |
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) |