From 56ad1ead582f38e0984e880089903a16e1ef3ef3 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 9 Feb 2005 07:06:05 +0000 Subject: [PATCH] I don't know why this hunk of code was there, but it was causing problems for the Plugin plugin, so I removed it. --- src/plugin.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/plugin.py b/src/plugin.py index 98b5bd733..eb29f9ca2 100644 --- a/src/plugin.py +++ b/src/plugin.py @@ -36,6 +36,7 @@ import linecache import supybot.log as log import supybot.conf as conf import supybot.registry as registry +import supybot.callbacks as callbacks class Deprecated(ImportError): pass @@ -50,16 +51,6 @@ def loadPluginModule(name, ignoreDeprecation=False): except EnvironmentError: # OSError, IOError superclass. log.warning('Invalid plugin directory: %s; removing.', dir) conf.supybot.directories.plugins().remove(dir) - loweredFiles = map(str.lower, files) - try: - index = loweredFiles.index(name.lower()+'.py') - name = os.path.splitext(files[index])[0] - if name in sys.modules: - m = sys.modules[name] - if not hasattr(m, 'Class'): - raise ImportError, 'Module is not a plugin.' - except ValueError: # We'd rather raise the ImportError, so we'll let go... - pass moduleInfo = imp.find_module(name, pluginDirs) try: module = imp.load_module(name, *moduleInfo)