3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

Irc: log full tracebacks when disconnecting due to an error

This commit is contained in:
James Lu 2017-05-16 16:30:03 -07:00
parent 89f9b46ec0
commit ead20f5be9

View File

@ -334,8 +334,7 @@ class Irc(utils.DeprecatedAttributesObject):
# We also catch SystemExit here as a way to abort out connection threads properly, and stop the # We also catch SystemExit here as a way to abort out connection threads properly, and stop the
# IRC connection from freezing instead. # IRC connection from freezing instead.
except (OSError, RuntimeError, SystemExit) as e: except (OSError, RuntimeError, SystemExit) as e:
log.error('(%s) Disconnected from IRC: %s: %s', log.exception('(%s) Disconnected from IRC:', self.name)
self.name, type(e).__name__, str(e))
self.disconnect() self.disconnect()