Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty quit message raises IndexError #210

Open
OrpheusGr opened this issue Jul 10, 2023 · 0 comments
Open

Empty quit message raises IndexError #210

OrpheusGr opened this issue Jul 10, 2023 · 0 comments

Comments

@OrpheusGr
Copy link

OrpheusGr commented Jul 10, 2023

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 = [""]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant