From a5ee6ee874d534225b59bf2d5efc3c7785c126ab Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 19 Feb 2013 09:21:28 +0400 Subject: [PATCH] irc: catch exception in gethostbyname --- backends/irc/__init__.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/backends/irc/__init__.py b/backends/irc/__init__.py index 0e7b757..1efa97e 100644 --- a/backends/irc/__init__.py +++ b/backends/irc/__init__.py @@ -96,7 +96,11 @@ class IrcThread(threading.Thread): elif '352' in line: # answer to /who # warning: this is a horrible hack which apparently works k = line.index('352') - ip = socket.gethostbyname(line[k+4]) + try: + ip = socket.gethostbyname(line[k+4]) + except: + print_log("gethostbyname error", line[k+4]) + continue name = line[k+6] host = line[k+9] ports = line[k+10:] -- 1.7.1