From 6d69e95c296d2a2f3081a3934f89f25321e47182 Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 3 Mar 2016 11:30:54 +0200 Subject: XTERM might not be present on the machine so TUI -x might give exception - fix it --- scripts/automation/trex_control_plane/stl/console/trex_console.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/stl/console/trex_console.py') 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 -- cgit 1.2.3-korg