mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Fixed a possible bug in the ArgumentError handler and replaced my SyntaxError(Error) stupidity.
This commit is contained in:
parent
44d4c98dc7
commit
00290faca9
@ -289,8 +289,11 @@ class IrcObjectProxy:
|
|||||||
self.args.insert(0, name)
|
self.args.insert(0, name)
|
||||||
self.reply(self.msg, '[%s]' % ' '.join(self.args))
|
self.reply(self.msg, '[%s]' % ' '.join(self.args))
|
||||||
except ArgumentError:
|
except ArgumentError:
|
||||||
|
if hasattr(command, '__doc__'):
|
||||||
self.reply(self.msg, command.__doc__.splitlines()[0])
|
self.reply(self.msg, command.__doc__.splitlines()[0])
|
||||||
except Error, e:
|
else:
|
||||||
|
self.reply(self.msg, 'Invalid arguments.')
|
||||||
|
except (SyntaxError, Error), e:
|
||||||
self.reply(self.msg, debug.exnToString(e))
|
self.reply(self.msg, debug.exnToString(e))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
debug.recoverableException()
|
debug.recoverableException()
|
||||||
@ -347,7 +350,7 @@ class CommandThread(threading.Thread):
|
|||||||
(self.commandName, elapsed), 'verbose')
|
(self.commandName, elapsed), 'verbose')
|
||||||
except ArgumentError:
|
except ArgumentError:
|
||||||
self.irc.reply(self.msg, self.command.__doc__.splitlines()[0])
|
self.irc.reply(self.msg, self.command.__doc__.splitlines()[0])
|
||||||
except Error, e:
|
except (SyntaxError, Error), e:
|
||||||
self.irc.reply(self.msg, debug.exnToString(e))
|
self.irc.reply(self.msg, debug.exnToString(e))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
debug.recoverableException()
|
debug.recoverableException()
|
||||||
|
Loading…
Reference in New Issue
Block a user