[pygi] Dont complain if another base has implemented the method



commit 686e10fcdb108af9758eb025a3447813c3513a93
Author: Tomeu Vizoso <tomeu sugarlabs org>
Date:   Thu Apr 29 10:55:13 2010 +0200

    Dont complain if another base has implemented the method
    
    https://bugzilla.gnome.org/show_bug.cgi?id=617153

 gi/types.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gi/types.py b/gi/types.py
index 23c44ea..d96c510 100644
--- a/gi/types.py
+++ b/gi/types.py
@@ -99,7 +99,8 @@ class MetaClassHelper(object):
                 continue
             for vfunc_info in base.__info__.get_vfuncs():
                 vfunc = getattr(cls, 'do_' + vfunc_info.get_name(), None)
-                if vfunc is None and isinstance(base.__info__, InterfaceInfo):
+                if vfunc is None and isinstance(base.__info__, InterfaceInfo) and \
+                        not hasattr(cls, vfunc_info.get_name()):
                     raise TypeError('Class implementing %s.%s should implement '
                             'the method do_%s()' % (base.__info__.get_namespace(),
                                                     base.__info__.get_name(),



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