[pygobject] Improve error reporting for missing attributes in introspection modules
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Improve error reporting for missing attributes in introspection modules
- Date: Wed, 28 Jul 2010 09:12:32 +0000 (UTC)
commit 045433a1f8167205dc8eae613dcb8835d02c8916
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date: Wed Jul 28 10:59:49 2010 +0200
Improve error reporting for missing attributes in introspection modules
gi/module.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/module.py b/gi/module.py
index 36a5e75..e302cfc 100644
--- a/gi/module.py
+++ b/gi/module.py
@@ -93,7 +93,7 @@ class IntrospectionModule(object):
info = repository.find_by_name(self._namespace, name)
if not info:
raise AttributeError("%r object has no attribute %r" % (
- self.__class__.__name__, name))
+ self.__name__, name))
if isinstance(info, EnumInfo):
g_type = info.get_g_type()
@@ -170,7 +170,7 @@ class IntrospectionModule(object):
def __repr__(self):
path = repository.get_typelib_path(self._namespace)
- return "<DynamicModule %r from %r>" % (self._namespace, path)
+ return "<IntrospectionModule %r from %r>" % (self._namespace, path)
class DynamicGObjectModule(IntrospectionModule):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]