Print the goddamn traceback

This commit is contained in:
Alexandre Aubin 2020-05-07 00:34:13 +02:00
parent d946ee92a9
commit 840f27d2fb
2 changed files with 4 additions and 0 deletions

View file

@ -563,6 +563,8 @@ class ActionsMap(object):
)
func = getattr(mod, func_name)
except (AttributeError, ImportError):
import traceback
traceback.print_exc()
logger.exception("unable to load function %s.%s", namespace, func_name)
raise MoulinetteError("error_see_log")
else:

View file

@ -361,6 +361,8 @@ class _CallbackAction(argparse.Action):
mod = __import__(mod_name, globals=globals(), level=0, fromlist=[func_name])
func = getattr(mod, func_name)
except (AttributeError, ImportError):
import traceback
traceback.print_exc()
raise ValueError("unable to import method {0}".format(self.callback_method))
self._callback = func