mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +01:00
Better handling of gaierror.
This commit is contained in:
parent
98f0d46266
commit
2434bdd063
@ -39,6 +39,7 @@ import supybot.fix as fix
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import socket
|
||||||
|
|
||||||
import supybot.log as supylog
|
import supybot.log as supylog
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
@ -139,7 +140,10 @@ class Log(object):
|
|||||||
|
|
||||||
def connectError(self, server, e):
|
def connectError(self, server, e):
|
||||||
if isinstance(e, Exception):
|
if isinstance(e, Exception):
|
||||||
e = utils.exnToString(e)
|
if isinstance(e, socket.gaierror):
|
||||||
|
e = e.args[1]
|
||||||
|
else:
|
||||||
|
e = utils.exnToString(e)
|
||||||
self.warning('Error connecting to %s: %s', server, e)
|
self.warning('Error connecting to %s: %s', server, e)
|
||||||
|
|
||||||
def disconnect(self, server, e=None):
|
def disconnect(self, server, e=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user