Empty quit message raises IndexError
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- networking
Research direction
Start in irc/client.py at _handle_other, where an empty quit message produces the reported IndexError. Reproduce processing an empty quit message and verify that it completes without raising while preserving the message handling behavior.
Written by the indexing model from the issue text.
Description
When a quit message is empty an IndexError is raised as the line is processed.
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/orfeas/DiscIRC-Relay/classcon.py", line 48, in startloop
reactor.process_once(0.2)
File "/home/orfeas/.local/lib/python3.9/site-packages/irc/client.py", line 827, in process_once
self.process_data(in_)
File "/home/orfeas/.local/lib/python3.9/site-packages/irc/client.py", line 792, in process_data
conn.process_data()
File "/home/orfeas/.local/lib/python3.9/site-packages/irc/client.py", line 268, in process_data
self._process_line(line)
File "/home/orfeas/.local/lib/python3.9/site-packages/irc/client.py", line 299, in _process_line
handler(arguments, command, source, tags)
File "/home/orfeas/.local/lib/python3.9/site-packages/irc/client.py", line 348, in _handle_other
arguments = [arguments[0]]
IndexError: list index out of range
What solved the issue for me is a try-except block in def _handle_other line 348
try:
arguments = [arguments[0]]
except IndexError:
arguments = [""]
- Dominant language
- Python
- Stars
- 422
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jaraco/irc
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
docs pydanty:is-working
Difficulty 1/5 Under an hour Newbie friendliness 88/100
pydantic/pydantic-ai#13563 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
NCATSTranslator/Babel#1204 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
alltheplaces/alltheplaces#20570 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
sio2project/oioioi#981 · 1 reaction ·
Maintainers usually reply within 1 day