Watch out for ImportErrors when getting attributers from an object (it may be a pseudo module that will try to import other modules.)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-12-18 19:07:53 +00:00
parent c480c4578c
commit 53925ab3cc

View File

@@ -342,6 +342,11 @@ def describe_class(obj, module_class, module_name, constants):
except AttributeError:
# Thanks to ReportLab for this funny exception...
continue
except ImportError:
# This can come from the pseudo module in wx.lib.six
message = "ImportError from '%s.%s'.\n Exception was: %s"%(obj, name, format_traceback())
print(('\nWARNING: %s\n' % message))
continue
if ismodule(item):
continue