[scanner] Catch OSError too when checking for libtool
[gnome.gobject-introspection] / giscanner / utils.py
index 29a5560..3bbf33b 100644 (file)
@@ -95,8 +95,9 @@ def get_libtool_command(options):
         return libtool_path.split(' ')
 
     try:
-        subprocess.check_call(['libtool', '--version'])
-    except subprocess.CalledProcessError, e:
+        subprocess.check_call(['libtool', '--version'],
+                              stdout=open(os.devnull))
+    except:
         # If libtool's not installed, assume we don't need it
         return None