[giscanner] Catch CalledProcessError and OSError
authorJohan Dahlin <johan@gnome.org>
Wed, 17 Feb 2010 16:53:07 +0000 (14:53 -0200)
committerJohan Dahlin <johan@gnome.org>
Wed, 17 Feb 2010 16:53:07 +0000 (14:53 -0200)
Instead of catching all errors, including AttributeError,
TypeError and NameError.

giscanner/utils.py

index 3bbf33b..1bd23fc 100644 (file)
@@ -97,7 +97,7 @@ def get_libtool_command(options):
     try:
         subprocess.check_call(['libtool', '--version'],
                               stdout=open(os.devnull))
-    except:
+    except (subprocess.CalledProcessError, OSError), e:
         # If libtool's not installed, assume we don't need it
         return None