diff options
-rw-r--r-- | MgaRepo/util.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/MgaRepo/util.py b/MgaRepo/util.py index 18759aa..ff71ce7 100644 --- a/MgaRepo/util.py +++ b/MgaRepo/util.py @@ -25,10 +25,13 @@ def execcmd(*cmd, **kwargs): assert (kwargs.get("collecterr") and kwargs.get("show")) or not kwargs.get("collecterr"), \ ("execcmd is implemented to handle collecterr=True only if show=True") # split command args - if isinstance(cmd[0], str) and len(cmd) is 1: - cmdargs = shlex.split(cmd[0]) + if isinstance(cmd[0], str): + if len(cmd) is 1: + cmdargs = shlex.split(cmd[0]) + else: + cmdargs = cmd[:] else: - cmdargs = cmd[:] + cmdargs = cmd[0][:] stdout = None stderr = None |