From 532806176cdfb97a476b1cbadc218002758f7cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Wed, 3 Jan 2018 00:57:55 +0100 Subject: [PATCH] pngbot.py:IrcBot.readline(): correctly catch socket.timeout exception. --- pngbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pngbot.py b/pngbot.py index fdfa397..dac750e 100755 --- a/pngbot.py +++ b/pngbot.py @@ -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")