3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-11 20:52:42 +01:00

log: fix check for irc.pseudoclient

This commit is contained in:
James Lu 2016-05-14 13:52:21 -07:00
parent 32bc5f120b
commit 1c4cfa680c

2
log.py
View File

@ -102,7 +102,7 @@ class PyLinkChannelLogger(logging.Handler):
# 3) Target channel must exist
# 4) Main PyLink client must be in this target channel
# 5) This function hasn't been called already (prevents recursive loops).
if hasattr(self.irc, 'pseudoclient') and self.irc.connected.is_set() \
if self.irc.pseudoclient and self.irc.connected.is_set() \
and self.channel in self.irc.channels and self.irc.pseudoclient.uid in \
self.irc.channels[self.channel].users and not self.called: