diff --git a/tools/conf/extract_opts.py b/tools/conf/extract_opts.py index c34f2eefe27..4650c134f05 100644 --- a/tools/conf/extract_opts.py +++ b/tools/conf/extract_opts.py @@ -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)