From e47feb25a640b469623cfed26e1e4403d82adfa3 Mon Sep 17 00:00:00 2001 From: khramshinr Date: Wed, 5 Feb 2025 12:29:05 +0700 Subject: T6058: Fix popen command wrapper handling Ensure `wrapper` is only prepended to `command` when it is non-empty --- python/vyos/utils/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') 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) -- cgit v1.2.3