Really make supybot-wizard see the new-style plugins.

This commit is contained in:
James Vega 2005-05-06 02:31:42 +00:00
parent 5948a710eb
commit 903e605c77
1 changed files with 7 additions and 7 deletions

View File

@ -61,17 +61,17 @@ import supybot.questions as questions
from supybot.questions import output, yn, anything, something, expect, getpass
def getPlugins(pluginDirs):
filenames = []
plugins = set([])
join = os.path.join
for pluginDir in pluginDirs:
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:
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 = list(plugins)
plugins.sort()