changeset 346:9cb4ed04434f

catch OSErrors if some programs are not installed
author Bjoern Ricks <bricks@intevation.de>
date Mon, 26 Apr 2010 10:12:35 +0000
parents 27eccce96949
children 2910051b91f7
files treepkg/run.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/run.py	Mon Apr 26 09:33:58 2010 +0000
+++ b/treepkg/run.py	Mon Apr 26 10:12:35 2010 +0000
@@ -46,7 +46,10 @@
     if inputdata is not None:
         process.stdin.write(inputdata)
         process.stdin.close()
-    ret = process.wait()
+    try:
+        ret = process.wait()
+    except OSError,e:
+        raise SubprocessError(command, e.errno, e.strerror)
     if ret != 0:
         raise SubprocessError(command, ret)
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)