mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Really make supybot-wizard see the new-style plugins.
This commit is contained in:
parent
5948a710eb
commit
903e605c77
@ -61,17 +61,17 @@ import supybot.questions as questions
|
|||||||
from supybot.questions import output, yn, anything, something, expect, getpass
|
from supybot.questions import output, yn, anything, something, expect, getpass
|
||||||
|
|
||||||
def getPlugins(pluginDirs):
|
def getPlugins(pluginDirs):
|
||||||
filenames = []
|
plugins = set([])
|
||||||
|
join = os.path.join
|
||||||
for pluginDir in pluginDirs:
|
for pluginDir in pluginDirs:
|
||||||
try:
|
try:
|
||||||
filenames.extend(os.listdir(pluginDir))
|
for filename in os.listdir(pluginDir):
|
||||||
|
fname = join(pluginDir, filename)
|
||||||
|
if (filename.endswith('.py') or os.path.isdir(fname)) \
|
||||||
|
and filename[0].isupper():
|
||||||
|
plugins.add(os.path.splitext(filename)[0])
|
||||||
except OSError:
|
except OSError:
|
||||||
continue
|
continue
|
||||||
plugins = sets.Set([])
|
|
||||||
for filename in filenames:
|
|
||||||
if (filename.endswith('.py') or os.path.isdir(filename)) \
|
|
||||||
and filename[0].isupper():
|
|
||||||
plugins.add(os.path.splitext(filename)[0])
|
|
||||||
plugins.discard('Owner')
|
plugins.discard('Owner')
|
||||||
plugins = list(plugins)
|
plugins = list(plugins)
|
||||||
plugins.sort()
|
plugins.sort()
|
||||||
|
Loading…
Reference in New Issue
Block a user