mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 01:30:20 +00:00
Display the failed import reason
This commit is contained in:
parent
e6df8cbe24
commit
0add87e7b9
1 changed files with 2 additions and 2 deletions
|
@ -49,8 +49,8 @@ def mod_data(opts, full):
|
|||
finder = modulefinder.ModuleFinder()
|
||||
try:
|
||||
finder.load_file(full)
|
||||
except ImportError:
|
||||
print('ImportError - {0}'.format(full), file=sys.stderr)
|
||||
except ImportError as exc:
|
||||
print('ImportError - {0} (Reason: {1})'.format(full, exc), file=sys.stderr)
|
||||
return ret
|
||||
for name, mod in finder.modules.items():
|
||||
basemod = name.split('.')[0]
|
||||
|
|
Loading…
Add table
Reference in a new issue