IRC: Handle error by displaying the error message.
The proper solution would be to handle each errors differently. But for now, logging the message is at least informative to the user.
This commit is contained in:
parent
28cae1a71c
commit
ad9b0e62a4
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
import multiprocessing as mp
|
||||
import sys
|
||||
from typing import Any, Dict, Optional
|
||||
|
@ -141,3 +142,6 @@ class IRCBot(irc.bot.SingleServerIRCBot):
|
|||
except ValueError:
|
||||
return
|
||||
self.dcc_connect(address, port)
|
||||
|
||||
def on_error(self, c: ServerConnection, e: Event) -> None:
|
||||
logging.error("error from server: %s", e.target)
|
||||
|
|
Loading…
Add table
Reference in a new issue