mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Print the goddamn traceback
This commit is contained in:
parent
d946ee92a9
commit
840f27d2fb
2 changed files with 4 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue