[Kimchi-devel] [PATCH v2] [Wok] Kimchi kills Wokd due to sys.exit() calls in files networks.py and storagepools.py
bianca at linux.vnet.ibm.com
bianca at linux.vnet.ibm.com
Mon Jul 25 18:24:48 UTC 2016
From: Bianca Carvalho <bianca at linux.vnet.ibm.com>
Added an Exception to not load kimchi plugin (servers.py) in case network or
storagepool does not exist or is not active.
Signed-off-by: Bianca Carvalho <bianca at linux.vnet.ibm.com>
---
src/wok/server.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/wok/server.py b/src/wok/server.py
index 8a02596..04bf1bc 100644
--- a/src/wok/server.py
+++ b/src/wok/server.py
@@ -179,6 +179,7 @@ class Server(object):
self.app = cherrypy.tree.mount(WokRoot(model_instance, dev_env),
config=self.configObj)
+
self._load_plugins(options)
# Terminate proxy when cherrypy server is terminated
@@ -201,7 +202,7 @@ class Server(object):
try:
plugin_app = import_class(plugin_class)(options)
- except ImportError, e:
+ except (ImportError, Exception), e:
cherrypy.log.error_log.error(
"Failed to import plugin %s, "
"error: %s" % (plugin_class, e.message)
--
2.7.4
More information about the Kimchi-devel
mailing list