From 894f140709bb9528abfc0587ad227923356c8b7c Mon Sep 17 00:00:00 2001
From: Sebastian Koslowski <koslowski@kit.edu>
Date: Thu, 18 Sep 2014 09:23:45 -0400
Subject: grc: fix missing xterm (Bug #725)

---
 grc/python/Generator.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'grc/python/Generator.py')

diff --git a/grc/python/Generator.py b/grc/python/Generator.py
index 92f36cf30b..caf45fa3b1 100644
--- a/grc/python/Generator.py
+++ b/grc/python/Generator.py
@@ -93,10 +93,10 @@ This is usually undesired. Consider removing the throttle block.''')
         #   python_exe = 'pythonw'
 
         #setup the command args to run
-        cmds = [python_exe, '-u', self.get_file_path()] #-u is unbuffered stdio
+        cmds = [python_exe, '-u', self.get_file_path()]  # -u is unbuffered stdio
 
-        #when in no gui mode on linux, use an xterm (looks nice)
-        if self._generate_options == 'no_gui' and 'linux' in sys.platform.lower():
+        # when in no gui mode on linux, use a graphical terminal (looks nice)
+        if self._generate_options == 'no_gui' and os.path.exists(XTERM_EXECUTABLE):
             cmds = [XTERM_EXECUTABLE, '-e'] + cmds
 
         p = subprocess.Popen(args=cmds, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, universal_newlines=True)
-- 
cgit v1.2.3