From: Huang Hao Date: Thu, 28 Feb 2013 05:41:35 +0000 (+0800) Subject: Give reason when failed to load plugin module. X-Git-Tag: 0.18~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d552a40bcfebe2975ed256e57d480434f94e1b5;p=platform%2Fupstream%2Fmic.git Give reason when failed to load plugin module. It will be helpful to solve problems. Change-Id: I02f36706c67cfb9fedc9029ea5a177aa85c2ac61 --- diff --git a/mic/plugin.py b/mic/plugin.py index 41c5665..c1153a9 100644 --- a/mic/plugin.py +++ b/mic/plugin.py @@ -74,9 +74,10 @@ class PluginMgr(object): self.plugin_dirs[pdir] = True msger.debug("Plugin module %s:%s imported"\ % (mod, pymod.__file__)) - except ImportError, e: - msger.warning('Loading failed, skip plugin %s/%s'\ - % (os.path.basename(pdir), mod)) + except ImportError, err: + msg = 'Failed to load plugin %s/%s: %s' \ + % (os.path.basename(pdir), mod, err) + msger.warning(msg) del(sys.path[0])