diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2012-12-04 20:57:09 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2012-12-04 20:57:09 +0000 |
commit | b8f3d9ddaa8ac8d740f7d1a4fa28e18c710e2e5c (patch) | |
tree | d398d7f6d0071b7c4caad2f0474c64c3176e311d | |
parent | 245e5d4a3a87b831606aa1fd1940ff1bbd49c6f4 (diff) | |
download | sos-b8f3d9ddaa8ac8d740f7d1a4fa28e18c710e2e5c.tar.gz |
Don't handle plugin exceptions in import_plugin
Don't catch exceptions thrown during plugin import from import_plugin
itself. The main load_plugins in sosreport.py already handles
exception logging and trapping them here loses useful information.
-rw-r--r-- | sos/plugins/__init__.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 981f7a4d..048d2149 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -813,10 +813,7 @@ def import_plugin(name, superclasses=None): module. superclasses should be a tuple of valid superclasses to import, this defaults to (Plugin,). """ - try: - plugin_fqname = "sos.plugins.%s" % name - if not superclasses: - superclasses = (Plugin,) - return import_module(plugin_fqname, superclasses) - except ImportError, e: - return None + plugin_fqname = "sos.plugins.%s" % name + if not superclasses: + superclasses = (Plugin,) + return import_module(plugin_fqname, superclasses) |