[gcdebug] ignore _NeedAuthAccessMock instances
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 22 Apr 2015 09:52:28 +0200
changeset 10312 48e57fd17864
parent 10311 4e9dcca71fad
child 10313 ae9e23cf8790
[gcdebug] ignore _NeedAuthAccessMock instances When looping over gc.get_objects(), we'd crash in _NeedAuthAccessMock.__getattribute__.
_gcdebug.py
--- a/_gcdebug.py	Tue Feb 10 14:38:25 2015 +0100
+++ b/_gcdebug.py	Wed Apr 22 09:52:28 2015 +0200
@@ -19,6 +19,7 @@
 import gc, types, weakref
 
 from cubicweb.schema import CubicWebRelationSchema, CubicWebEntitySchema
+from cubicweb.dbapi import _NeedAuthAccessMock
 
 listiterator = type(iter([]))
 
@@ -29,6 +30,7 @@
     property, classmethod,
     types.ModuleType, types.FunctionType, types.MethodType,
     types.MemberDescriptorType, types.GetSetDescriptorType,
+    _NeedAuthAccessMock,
     )
 
 def _get_counted_class(obj, classes):