Fix import_attr bug pointed out by David Schaurecker
This commit is contained in:
parent
4799f8177c
commit
b215c0fa7b
@ -42,7 +42,7 @@ def import_attr(name, *pkgs, callback_at=None):
|
|||||||
try:
|
try:
|
||||||
return getattr(
|
return getattr(
|
||||||
importlib.import_module(pkg.__name__ + '.' + mod), attr)
|
importlib.import_module(pkg.__name__ + '.' + mod), attr)
|
||||||
except (ModuleNotFoundError, AttributeError):
|
except (ModuleNotFoundError, AttributeError) as e:
|
||||||
errors.append(e)
|
errors.append(e)
|
||||||
|
|
||||||
if callback_at is None:
|
if callback_at is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user