diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-01-21 03:50:49 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-01-21 03:50:49 +0000 |
commit | 1d1b5be0efae5e543a5d3708a125f72eacaccb5a (patch) | |
tree | 430e7fce3390621f08ba6f49f4ec32f5978cd596 /src/lib/Server/Core.py | |
parent | df0d516ce79bba0b12774b101b84a83df751d08e (diff) | |
download | bcfg2-1d1b5be0efae5e543a5d3708a125f72eacaccb5a.tar.gz bcfg2-1d1b5be0efae5e543a5d3708a125f72eacaccb5a.tar.bz2 bcfg2-1d1b5be0efae5e543a5d3708a125f72eacaccb5a.zip |
Add support for out of tree plugins
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5031 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Core.py')
-rw-r--r-- | src/lib/Server/Core.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index ca55075cb..1a85c7c0f 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -84,8 +84,11 @@ class Core(object): mod = getattr(__import__("Bcfg2.Server.Plugins.%s" % (plugin)).Server.Plugins, plugin) except ImportError, e: - logger.error("Failed to load plugin %s: %s" % (plugin, e)) - return + try: + mod = __import__(plugin) + except: + logger.error("Failed to load plugin %s" % (plugin), exc_info=1) + return plug = getattr(mod, plugin) if plug.experimental: logger.info("Loading experimental plugin %s" % (plugin)) |