3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

networks.remote: suppress errors if restoring remoteirc.pseudoclient.account

This should rarely happen, but can be purposely caused by causing the remote network to disconnect through 'remote'.
This commit is contained in:
James Lu 2017-04-09 15:21:19 -07:00
parent 3f6501fa88
commit 0e6d33a668

View File

@ -134,7 +134,11 @@ def remote(irc, source, args):
log.debug('(%s) networks.remote: restoring reply() of IRC object %s', irc.name, netname)
remoteirc._reply = old_reply
# Remove the identification override after we finish.
remoteirc.pseudoclient.account = ''
try:
remoteirc.pseudoclient.account = ''
except:
log.warning('(%s) networks.remote: failed to restore pseudoclient account for %s; '
'did the remote network disconnect while running this command?', irc.name, netname)
REMOTE_IN_USE.clear()
@utils.add_cmd