[pygobject] Use AttributeError for static binding protection



commit e674340db90c29c556b45e0a8f8b2da72661b738
Author: Simon Feltman <sfeltman src gnome org>
Date:   Mon Aug 11 23:12:38 2014 -0700

    Use AttributeError for static binding protection
    
    Replace usage of RuntimeError with AttributeError in the dummy module
    protecting importing of static bindings. This is needed so we don't break
    modules like inspect which is used by ipython.

 gi/__init__.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gi/__init__.py b/gi/__init__.py
index 3ef2289..fe4abcf 100644
--- a/gi/__init__.py
+++ b/gi/__init__.py
@@ -59,7 +59,7 @@ class _DummyStaticModule(types.ModuleType):
     __path__ = None
 
     def __getattr__(self, name):
-        raise RuntimeError(_static_binding_error)
+        raise AttributeError(_static_binding_error)
 
 
 sys.modules['glib'] = _DummyStaticModule('glib', _static_binding_error)


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