mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-06 08:33:56 +00:00
make sure we only accept folders as plugins
This commit is contained in:
parent
375a7fdc64
commit
dbe83d4ede
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user