[gobject-introspection] [giscanner] Catch CalledProcessError and OSError



commit 111cdb2a94d69c6fb4d34e2677f604fcd5e88ffc
Author: Johan Dahlin <johan gnome org>
Date:   Wed Feb 17 14:53:07 2010 -0200

    [giscanner] Catch CalledProcessError and OSError
    
    Instead of catching all errors, including AttributeError,
    TypeError and NameError.

 giscanner/utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/utils.py b/giscanner/utils.py
index 3bbf33b..1bd23fc 100644
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]