Merge "Add error reporting to generate_sample.sh on import failure."
This commit is contained in:
commit
072cd9c004
@ -79,12 +79,9 @@ def _print_module(mod_str):
|
|||||||
mod_str = mod_str[:mod_str.rfind(".")]
|
mod_str = mod_str[:mod_str.rfind(".")]
|
||||||
try:
|
try:
|
||||||
mod_obj = importutils.import_module(mod_str)
|
mod_obj = importutils.import_module(mod_str)
|
||||||
except (ValueError, AttributeError), err:
|
|
||||||
return
|
|
||||||
except ImportError, ie:
|
|
||||||
sys.stderr.write("%s\n" % str(ie))
|
|
||||||
return
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
sys.stderr.write("Failed to collect options from module %s: %s\n" % (
|
||||||
|
mod_str, str(e)))
|
||||||
return
|
return
|
||||||
_list_opts(mod_obj, mod_str)
|
_list_opts(mod_obj, mod_str)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user