mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Added proper ValueError raising when there's no command in IrcMsg.__init__.
This commit is contained in:
parent
cf8c5c01cf
commit
d6059ac71e
@ -45,6 +45,8 @@ class IrcMsg(object):
|
||||
"""
|
||||
#__slots__ = ('_args', '_command', '_host', '_nick', '_prefix', '_user')
|
||||
def __init__(self, s='', command='', args=None, prefix='', msg=None):
|
||||
if not s and not command and not msg:
|
||||
raise ValueError, 'IRC messages require a command.'
|
||||
if msg:
|
||||
prefix = msg.prefix
|
||||
command = msg.command
|
||||
|
Loading…
Reference in New Issue
Block a user