summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit/plugins.py
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-07-15 22:22:38 +0200
committerJoel Andres Granados <jgranado@redhat.com>2008-07-15 22:22:38 +0200
commit6551c3c0f3eda6397c07edc0e8b0dc8643bd2e8d (patch)
tree91dd25e419017550e97344b6222666c6a1e89d94 /pyfirstaidkit/plugins.py
parent8bf3408b2ec2b39dd27df68291ae832d96f4484e (diff)
downloadfirstaidkit-6551c3c0f3eda6397c07edc0e8b0dc8643bd2e8d.tar.gz
firstaidkit-6551c3c0f3eda6397c07edc0e8b0dc8643bd2e8d.tar.xz
firstaidkit-6551c3c0f3eda6397c07edc0e8b0dc8643bd2e8d.zip
Catch the exception where the user configures a plugin that is not found.
Diffstat (limited to 'pyfirstaidkit/plugins.py')
-rw-r--r--pyfirstaidkit/plugins.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyfirstaidkit/plugins.py b/pyfirstaidkit/plugins.py
index acccf6e..87d5994 100644
--- a/pyfirstaidkit/plugins.py
+++ b/pyfirstaidkit/plugins.py
@@ -614,5 +614,7 @@ class PluginSystem(object):
def getplugin(self, plugin):
"""Get top level class of plugin, so we can create the instance and
call the steps manually"""
- return self._plugins[plugin].get_plugin()
-
+ if plugin in self._plugins:
+ return self._plugins[plugin].get_plugin()
+ else:
+ raise InvalidPluginNameException(plugin)