Merge "Add error reporting to generate_sample.sh on import failure."

This commit is contained in:
Jenkins 2013-06-02 16:00:28 +00:00 committed by Gerrit Code Review
commit 072cd9c004

View File

@ -79,12 +79,9 @@ def _print_module(mod_str):
mod_str = mod_str[:mod_str.rfind(".")]
try:
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:
sys.stderr.write("Failed to collect options from module %s: %s\n" % (
mod_str, str(e)))
return
_list_opts(mod_obj, mod_str)