*Really* make the disconnect message look good with twistedDrivers.

This commit is contained in:
Jeremy Fincher 2004-08-25 04:44:35 +00:00
parent ee4900cb81
commit a0dbc917c2

View File

@ -150,11 +150,13 @@ class Log(object):
if e: if e:
if isinstance(e, Exception): if isinstance(e, Exception):
e = utils.exnToString(e) e = utils.exnToString(e)
self.warning('Disconnect from %s: %s.', server, e)
else: else:
if not server.endswith('.'): e = str(e)
server += '.' if not e.endswith('.'):
self.info('Disconnect from %s', server) e += '.'
self.warning('Disconnect from %s: %s', server, e)
else:
self.info('Disconnect from %s.', server)
def reconnect(self, network, when=None): def reconnect(self, network, when=None):
s = 'Reconnecting to %s' % network s = 'Reconnecting to %s' % network