pngbot.py:IrcBot.readline(): correctly catch socket.timeout exception.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-03 00:57:55 +01:00
parent ebd2ce9393
commit 532806176c

View File

@ -56,7 +56,7 @@ class IrcBot:
self.clientSocket.settimeout(timeout)
try:
msg = self.clientSocketFile.readline()
except TimeoutException:
except socket.timeout:
return "TIMEOUT"
if len(msg):
msg = msg.rstrip("\r\n")