commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/05: grc: fix xterm setting check


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/05: grc: fix xterm setting check
Date: Mon, 3 Nov 2014 18:47:20 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 8d62df788b01c76e47806f04dc6f064acda334ef
Author: Sebastian Koslowski <address@hidden>
Date:   Sun Nov 2 19:14:07 2014 +0100

    grc: fix xterm setting check
---
 grc/python/Generator.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/grc/python/Generator.py b/grc/python/Generator.py
index caf45fa..4a496b7 100644
--- a/grc/python/Generator.py
+++ b/grc/python/Generator.py
@@ -21,6 +21,7 @@ import os
 import sys
 import subprocess
 import tempfile
+from distutils.spawn import find_executable
 from Cheetah.Template import Template
 import expr_utils
 from Constants import \
@@ -96,8 +97,9 @@ This is usually undesired. Consider removing the throttle 
block.''')
         cmds = [python_exe, '-u', self.get_file_path()]  # -u is unbuffered 
stdio
 
         # 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
+        xterm_executable = find_executable(XTERM_EXECUTABLE)
+        if self._generate_options == 'no_gui' and xterm_executable:
+            cmds = [xterm_executable, '-e'] + cmds
 
         p = subprocess.Popen(args=cmds, stdout=subprocess.PIPE, 
stderr=subprocess.STDOUT, shell=False, universal_newlines=True)
         return p



reply via email to

[Prev in Thread] Current Thread [Next in Thread]