mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +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):
|
||||||
except OSError:
|
fname = join(pluginDir, filename)
|
||||||
continue
|
if (filename.endswith('.py') or os.path.isdir(fname)) \
|
||||||
plugins = sets.Set([])
|
|
||||||
for filename in filenames:
|
|
||||||
if (filename.endswith('.py') or os.path.isdir(filename)) \
|
|
||||||
and filename[0].isupper():
|
and filename[0].isupper():
|
||||||
plugins.add(os.path.splitext(filename)[0])
|
plugins.add(os.path.splitext(filename)[0])
|
||||||
|
except OSError:
|
||||||
|
continue
|
||||||
plugins.discard('Owner')
|
plugins.discard('Owner')
|
||||||
plugins = list(plugins)
|
plugins = list(plugins)
|
||||||
plugins.sort()
|
plugins.sort()
|
||||||
|
Loading…
Reference in New Issue
Block a user