diff options
Diffstat (limited to 'tests/topotests/munet/base.py')
| -rw-r--r-- | tests/topotests/munet/base.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/topotests/munet/base.py b/tests/topotests/munet/base.py index eb4b088442..c6ae70e09b 100644 --- a/tests/topotests/munet/base.py +++ b/tests/topotests/munet/base.py @@ -1241,9 +1241,13 @@ class Commander: # pylint: disable=R0904 # XXX not appropriate for ssh cmd = ["sudo", "-Eu", os.environ["SUDO_USER"]] + cmd - if not isinstance(nscmd, str): - nscmd = shlex.join(nscmd) - cmd.append(nscmd) + if title: + cmd.append("-t") + cmd.append(title) + + if isinstance(nscmd, str): + nscmd = shlex.split(nscmd) + cmd.extend(nscmd) elif "DISPLAY" in os.environ: cmd = [get_exec_path_host("xterm")] if "SUDO_USER" in os.environ: |
