Permalink
Browse files

Check veusz executables exist in embedding interface

  • Loading branch information...
1 parent c6f4819 commit 42d2f13f7ac8aeb3d217e54eae3a2a4a97a448f0 @jeremysanders jeremysanders committed Mar 1, 2010
Showing with 9 additions and 5 deletions.
  1. +9 −5 embed.py
View
@@ -140,13 +140,17 @@ def makeRemoteProcess(cls):
# try embed_remote.py in this directory, veusz in this directory
# or veusz on the path in order
- for shell, cmd in ( (False, [sys.executable, remoteembed]),
- (False, [veuszex]),
- (False, ['veusz']),
- (True, ['veusz']), ):
+ for withpath, cmd in ( (False, [sys.executable, remoteembed]),
+ (False, [veuszex]),
+ (True, ['veusz']), ):
+ # windows doesn't seem to think an exception should be raised
+ # if there is an error running the command
+ if not withpath and False in [os.path.exists(c) for c in cmd]:
+ continue
+
try:
cls.remote = subprocess.Popen(cmd + ['--embed-remote'],
- shell=shell, bufsize=0,
+ shell=False, bufsize=0,
close_fds=False,
stdin=subprocess.PIPE)
return

0 comments on commit 42d2f13

Please sign in to comment.