mirror of
https://git.deluge-torrent.org/deluge
synced 2025-09-18 15:51:57 +00:00
make sure we only accept folders as plugins
This commit is contained in:
parent
375a7fdc64
commit
dbe83d4ede
1 changed files with 3 additions and 1 deletions
|
@ -51,7 +51,9 @@ class PluginManager:
|
||||||
def scan_for_plugins(self):
|
def scan_for_plugins(self):
|
||||||
for folder in self.plugin_dirs:
|
for folder in self.plugin_dirs:
|
||||||
print "Scanning plugin dir",folder
|
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)
|
path = os.path.join(folder, modname)
|
||||||
if '__init__.py' in os.listdir(path):
|
if '__init__.py' in os.listdir(path):
|
||||||
# Import the found module. Note that the last
|
# Import the found module. Note that the last
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue