Fixed bug in load and removed Sorry.

This commit is contained in:
Jeremy Fincher 2003-04-02 08:18:20 +00:00
parent 99cb3579a6
commit b21071c382

View File

@ -290,12 +290,12 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
""" """
name = getArgs(args) name = getArgs(args)
if name in [cb.name() for cb in irc.callbacks]: if name in [cb.name() for cb in irc.callbacks]:
irc.error('Sorry, that module is already loaded.') irc.error(msg, 'That module is already loaded.')
return return
try: try:
moduleInfo = imp.find_module(name) moduleInfo = imp.find_module(name)
except ImportError: except ImportError:
irc.error(msg, 'Sorry, no plugin %s exists.' % name) irc.error(msg, 'No plugin %s exists.' % name)
return return
module = imp.load_module(name, *moduleInfo) module = imp.load_module(name, *moduleInfo)
callback = module.Class() callback = module.Class()
@ -316,7 +316,7 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
try: try:
moduleInfo = imp.find_module(name) moduleInfo = imp.find_module(name)
except ImportError: except ImportError:
irc.error(msg, 'Sorry, no plugin %s exists.' % name) irc.error(msg, 'No plugin %s exists.' % name)
return return
module = imp.load_module(name, *moduleInfo) module = imp.load_module(name, *moduleInfo)
callback = module.Class() callback = module.Class()