diff options
author | 2016-03-03 11:30:54 +0200 | |
---|---|---|
committer | 2016-03-03 11:30:54 +0200 | |
commit | 6d69e95c296d2a2f3081a3934f89f25321e47182 (patch) | |
tree | 0e892bf09479a5eb1612c9991dd304c0359b8101 | |
parent | 26873712908fcfb26ee5310c961846b79f0a8249 (diff) |
XTERM might not be present on the machine
so TUI -x might give exception - fix it
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/console/trex_console.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py index d96a7623..e5c989fb 100755 --- a/scripts/automation/trex_control_plane/stl/console/trex_console.py +++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py @@ -563,11 +563,15 @@ class TRexConsole(TRexGeneralCmd): return if opts.xterm: + if not os.path.exists('/usr/bin/xterm'): + print format_text("XTERM does not exists on this machine", 'bold') + return info = self.stateless_client.get_connection_info() exe = './trex-console --top -t -q -s {0} -p {1} --async_port {2}'.format(info['server'], info['sync_port'], info['async_port']) - cmd = ['xterm', '-geometry', '111x47', '-sl', '0', '-title', 'trex_tui', '-e', exe] + cmd = ['/usr/bin/xterm', '-geometry', '111x47', '-sl', '0', '-title', 'trex_tui', '-e', exe] + self.terminal = subprocess.Popen(cmd) return |