Cleaned up a few logging messages.

This commit is contained in:
Jeremy Fincher 2004-01-21 23:35:34 +00:00
parent 5ac4a569a1
commit bdafdfe113
2 changed files with 6 additions and 5 deletions

View File

@ -68,14 +68,14 @@ class AsyncoreDriver(asynchat.async_chat, object):
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
try:
self.connect(self.server)
except:
log.exception('Error connecting:')
self.close()
except socket.error, e:
log.warning('Error connecting to %s: %s',self.irc.server,e.args[1])
self.reconnect(wait=True)
def scheduleReconnect(self):
when = log.timestamp(time.time()+60)
if not world.dying:
log.info('Scheduling reconnect to %s at %s', self.server, when)
log.info('Scheduling reconnect to %s at %s', self.irc.server, when)
def makeNewDriver():
self.irc.reset()
driver = self.__class__(self.server, self.irc)

View File

@ -144,7 +144,8 @@ class SocketDriver(drivers.IrcDriver):
self.conn.settimeout(conf.supybot.drivers.poll())
except socket.error, e:
if e.args[0] != 115:
log.warning('Error connecting to %s: %s', self.server, e)
log.warning('Error connecting to %s: %s',
self.irc.server, e.args[1])
self.reconnect(wait=True)
self.connected = True
self.reconnectWaitPeriodsIndex = 0