[Spice-devel] [Xspice PATCH 01/11] scripts/Xspice: which: warn if executable is not found
Uri Lublin
uril at redhat.com
Mon Jan 26 02:35:33 PST 2015
Also handle None parameter case.
---
scripts/Xspice | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/scripts/Xspice b/scripts/Xspice
index b8a7b78..fee2b0e 100755
--- a/scripts/Xspice
+++ b/scripts/Xspice
@@ -26,12 +26,15 @@ import signal
from subprocess import Popen, PIPE
def which(x):
+ if not x:
+ return x
if os.path.exists(x):
return x
for p in os.environ['PATH'].split(':'):
candidate = os.path.join(p, x)
if os.path.exists(candidate):
return candidate
+ print 'Warning: failed to find executable %s' % x
return None
if 'XSPICE_ENABLE_GDB' in os.environ:
--
1.7.1
More information about the Spice-devel
mailing list