[pygobject] fix exceptions so they work in python 3.x
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] fix exceptions so they work in python 3.x
- Date: Wed, 25 Aug 2010 09:36:04 +0000 (UTC)
commit bda58ec34fc443fe1108afc8532bec50f6fd0b44
Author: John (J5) Palmieri <johnp redhat com>
Date: Tue Aug 17 02:33:45 2010 -0400
fix exceptions so they work in python 3.x
https://bugzilla.gnome.org/show_bug.cgi?id=615872
gi/module.py | 2 +-
gi/types.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/module.py b/gi/module.py
index e302cfc..819fcc6 100644
--- a/gi/module.py
+++ b/gi/module.py
@@ -141,7 +141,7 @@ class IntrospectionModule(object):
elif g_type.is_a(gobject.TYPE_POINTER) or g_type == gobject.TYPE_NONE:
bases = (Struct,)
else:
- raise TypeError, "unable to create a wrapper for %s.%s" % (info.get_namespace(), info.get_name())
+ raise TypeError("unable to create a wrapper for %s.%s" % (info.get_namespace(), info.get_name()))
metaclass = StructMeta
else:
raise NotImplementedError(info)
diff --git a/gi/types.py b/gi/types.py
index 8ac9cab..7f937f9 100644
--- a/gi/types.py
+++ b/gi/types.py
@@ -50,7 +50,7 @@ def Constructor(info):
def constructor(cls, *args):
cls_name = info.get_container().get_name()
if cls.__name__ != cls_name:
- raise TypeError, '%s constructor cannot be used to create instances of a subclass' % cls_name
+ raise TypeError('%s constructor cannot be used to create instances of a subclass' % cls_name)
return info.invoke(cls, *args)
constructor.__info__ = info
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]