[autohelp] display information on import error

When a module import fails the wrapper script doesn't display its
path/name, so it is complicated to debug. this patch displays the module
name before re-raising the exception.

Change-Id: Ie9d691a41b0c178b856f19605a8c6434d3ce2c88
This commit is contained in:
Gauvain Pocentek 2015-12-17 17:54:53 +01:00
parent 29ca62215f
commit e8784d29c7
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ def import_modules(repo_location, package_name, verbose=0):
if verbose >= 2:
print(e)
continue
except Exception as e:
print("Impossible to import module %s" % modname)
raise e
_register_runtime_opts(module, abs_path, verbose)
_run_hook(modname)