diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2014-08-11 23:12:38 -0700 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2014-08-11 23:12:38 -0700 |
commit | e674340db90c29c556b45e0a8f8b2da72661b738 (patch) | |
tree | b683c213e5e2420732b18d5efb521cb02c56cec9 /gi/__init__.py | |
parent | 86fb12b3e9b7558000d100f8f212e970ae8c4fd2 (diff) | |
download | pygobject-e674340db90c29c556b45e0a8f8b2da72661b738.tar.gz |
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.
Diffstat (limited to 'gi/__init__.py')
-rw-r--r-- | gi/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/__init__.py b/gi/__init__.py index 3ef22894..fe4abcfb 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) |