From: ThomasV Date: Tue, 19 Feb 2013 05:21:28 +0000 (+0400) Subject: irc: catch exception in gethostbyname X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=a5ee6ee874d534225b59bf2d5efc3c7785c126ab irc: catch exception in gethostbyname --- 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:]