Commit Graph
5 Commits
Author SHA1 Message Date
Leo Huckvale 4ad9d8b7cd Simplify try-except 2016-07-18 12:26:16 +01:00
Leo Huckvale 725599fa96 Refactor try-except clause 2016-07-15 09:21:48 +01:00
Leo Huckvale fa89582d57 Fix tests for Python 2.6 2016-07-14 16:41:33 +01:00
Leo Huckvale e9ef60f8e5 Remove unused local variable for flake8 check 2016-07-14 15:32:06 +01:00
Leo Huckvale 670049c262 inspect: return defargs[0] if obj.__dict__ raises exception
The fallback implemented in #2731 cannot return `obj.__dict__[name]`
if the `__dict__` method has been redefined in such a way that it
raises an exception when trying to access it.

This commit adds a try-except block to work around this.
2016-07-14 14:13:06 +01:00