From ba6144386778ed42ce92430f2e9258d8240f8c1a Mon Sep 17 00:00:00 2001 From: Gui Chen Date: Thu, 18 Aug 2011 10:38:43 +0800 Subject: [PATCH] Bear empty module name Signed-off-by: Gui Chen --- mic/pluginmgr.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mic/pluginmgr.py b/mic/pluginmgr.py index ae14a56..169b1e2 100644 --- a/mic/pluginmgr.py +++ b/mic/pluginmgr.py @@ -77,6 +77,10 @@ class PluginMgr(object): logging.debug("Not a python file: %s" % os.path.join(dir_path, plugin_filename)) return + if plugin_filename == ".py": + logging.debug("Empty module name: %s" % os.path.join(dir_path, plugin_filename)) + return + if plugin_filename == "__init__.py": logging.debug("Unsupported python file: %s" % os.path.join(dir_path, plugin_filename)) return -- 2.7.4