[pkg] don't crash if g++ is not in $PATH
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 22 Jul 2015 11:36:11 +0200
changeset 774 336a9117fa1e
parent 773 74252f795c5d
child 775 c629ea9f78f6
[pkg] don't crash if g++ is not in $PATH Closes #298337
__pkginfo__.py
--- a/__pkginfo__.py	Fri Jul 17 16:43:18 2015 +0200
+++ b/__pkginfo__.py	Wed Jul 22 11:36:11 2015 +0200
@@ -49,7 +49,7 @@
             p = subprocess.Popen("./gecode_version", stdout=subprocess.PIPE)
             vers = p.communicate()[0].decode('ascii')
             version = [int(c) for c in vers.strip().split('.')]
-        except subprocess.CalledProcessError:
+        except (EnvironmentError, subprocess.CalledProcessError):
             pass
     return version