mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 15:26:37 +00:00
pngbot.py:IrcBot.readline(): correctly catch socket.timeout exception.
This commit is contained in:
parent
ebd2ce9393
commit
532806176c
@ -56,7 +56,7 @@ class IrcBot:
|
|||||||
self.clientSocket.settimeout(timeout)
|
self.clientSocket.settimeout(timeout)
|
||||||
try:
|
try:
|
||||||
msg = self.clientSocketFile.readline()
|
msg = self.clientSocketFile.readline()
|
||||||
except TimeoutException:
|
except socket.timeout:
|
||||||
return "TIMEOUT"
|
return "TIMEOUT"
|
||||||
if len(msg):
|
if len(msg):
|
||||||
msg = msg.rstrip("\r\n")
|
msg = msg.rstrip("\r\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user