jaraco / irc

Full-featured Python IRC library for Python.
MIT License
392 stars 86 forks source link

Crash on command with no arguments #63

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

Version: 12.4.2

Minimised test case:

import irc.client

reactor = irc.client.Reactor()
conn = irc.client.ServerConnection(reactor)
conn.connect("irc.twitch.tv", 6667, "")
conn._process_line("GLOBALUSERSTATE")

Backtrace:

Traceback (most recent call last):
  File "/home/andreas/irc-bug.py", line 6, in <module>
    conn._process_line("GLOBALUSERSTATE")
  File "/usr/lib64/python3.3/site-packages/irc/client.py", line 667, in _process_line
    target = arguments[0]
TypeError: 'NoneType' object is not subscriptable

jaraco commented 8 years ago

Add test capturing failure. Ref #63

→ <>


Original comment by: Jason R. Coombs

jaraco commented 8 years ago

Always generate a list in Arguments.from_group. Set target to None if no arguments are available from which to draw a target. Fixes #63.

→ <<cset 55ae04d2b441>>


Original comment by: Jason R. Coombs

jaraco commented 8 years ago

Released as 12.4.3.


Original comment by: Jason R. Coombs