mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Removed possible double-listing of plugins in getPlugins().
This commit is contained in:
parent
2140a8ac20
commit
f41a802b82
@ -42,12 +42,12 @@ def getPlugins():
|
|||||||
filenames = []
|
filenames = []
|
||||||
for dir in conf.pluginDirs:
|
for dir in conf.pluginDirs:
|
||||||
filenames.extend(os.listdir(dir))
|
filenames.extend(os.listdir(dir))
|
||||||
plugins = []
|
plugins = sets.Set([])
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
if filename.endswith('.py') and filename[0].isupper():
|
if filename.endswith('.py') and filename[0].isupper():
|
||||||
plugins.append(os.path.splitext(filename)[0])
|
plugins.add(os.path.splitext(filename)[0])
|
||||||
if 'OwnerCommands' in plugins:
|
plugins.discard('OwnerCommands')
|
||||||
plugins.remove('OwnerCommands')
|
plugins = list(plugins)
|
||||||
plugins.sort()
|
plugins.sort()
|
||||||
return plugins
|
return plugins
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user