[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 3bbf33be853873025ac20c6f81b21249288daeb2..1bd23fc03d547141423ab3a38c12ee763e7a3451 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