Commit 70aa1f79 authored by Tres Seaver's avatar Tres Seaver Committed by Dikeshwar

Harden module-crawling against trickery performed by six.

parent 5f2ba1ea
...@@ -163,6 +163,10 @@ class DebugManager(Item, Implicit): ...@@ -163,6 +163,10 @@ class DebugManager(Item, Implicit):
# return class reference info # return class reference info
counts = {} counts = {}
for m in sys.modules.values(): for m in sys.modules.values():
if m is None:
continue
if m.__name__.startswith('six'):
continue
for sym in dir(m): for sym in dir(m):
ob = getattr(m, sym) ob = getattr(m, sym)
if type(ob) in t: if type(ob) in t:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment