make sure we only accept folders as plugins

This commit is contained in:
Marcos Pinto 2007-10-14 17:35:08 +00:00
parent 375a7fdc64
commit dbe83d4ede
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ class PluginManager:
def scan_for_plugins(self):
for folder in self.plugin_dirs:
print "Scanning plugin dir",folder
for modname in os.listdir(folder):
pluginlist = [plugin for plugin in os.listdir(folder) if \
os.path.isdir(plugin)]
for modname in pluginlist:
path = os.path.join(folder, modname)
if '__init__.py' in os.listdir(path):
# Import the found module. Note that the last