monkeypatch: unnest handling code
this avoid python3 nested exceptions
This commit is contained in:
parent
cb6181255e
commit
2d05f831fe
|
@ -42,6 +42,11 @@ def resolve(name):
|
||||||
try:
|
try:
|
||||||
found = getattr(found, part)
|
found = getattr(found, part)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
# we use explicit un-nesting of the handling block in order
|
||||||
|
# to avoid nested exceptions on python 3
|
||||||
try:
|
try:
|
||||||
__import__(used)
|
__import__(used)
|
||||||
except ImportError as ex:
|
except ImportError as ex:
|
||||||
|
|
Loading…
Reference in New Issue