[pybank] Not all wrapped types have a gtype
- From: Johan Dahlin <johan src gnome org>
- To: svn-commits-list gnome org
- Subject: [pybank] Not all wrapped types have a gtype
- Date: Tue, 2 Jun 2009 10:46:23 -0400 (EDT)
commit de853594cf731d7d450fb73c3434f1da4409d575
Author: Tomeu Vizoso <tomeu sugarlabs org>
Date: Fri May 22 18:30:12 2009 +0200
Not all wrapped types have a gtype
---
bank/btypes.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/bank/btypes.py b/bank/btypes.py
index bf637a2..7fe0c50 100644
--- a/bank/btypes.py
+++ b/bank/btypes.py
@@ -195,7 +195,8 @@ class PyBankMeta(gobject.GObjectMeta):
if hasattr(cls.__info__, 'getFields'):
cls._setup_fields()
- repo.setObjectHasNewConstructor(cls.__gtype__)
+ if hasattr(cls, '__gtype__'):
+ repo.setObjectHasNewConstructor(cls.__gtype__)
def _setup_methods(cls, needs_constructor):
info = cls.__info__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]