Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/107811
Change subject: tcpircbot: avoid shadowing parent class's 'channels' attribute ...................................................................... tcpircbot: avoid shadowing parent class's 'channels' attribute Store channels to join in 'target_channels' attribute instead, to avoid clobbering the parent class's IRCDict object. Change-Id: I167c2b76947fd781ba085e183ac55be06669aeb4 --- M modules/tcpircbot/files/tcpircbot.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/11/107811/1 diff --git a/modules/tcpircbot/files/tcpircbot.py b/modules/tcpircbot/files/tcpircbot.py index 696b485..408b026 100755 --- a/modules/tcpircbot/files/tcpircbot.py +++ b/modules/tcpircbot/files/tcpircbot.py @@ -65,7 +65,7 @@ def __init__(self, network, nickname, channels, **options): ircbot.SingleServerIRCBot.__init__(self, [network], nickname, nickname) - self.channels = channels + self.target_channels = channels self.options = options for event in ['disconnect', 'join', 'part', 'welcome']: self.connection.add_global_handler(event, self.log_event) @@ -85,7 +85,7 @@ % vars(event)) def on_welcome(self, connection, event): - for channel in self.channels: + for channel in self.target_channels: connection.join(channel) @@ -152,7 +152,7 @@ data = codecs.decode(data, 'utf8', 'replace').strip() if data: logging.info('TCP %s: "%s"', sock.getpeername(), data) - for channel in bot.channels: + for channel in bot.target_channels: bot.connection.privmsg(channel, data) else: sock.close() -- To view, visit https://gerrit.wikimedia.org/r/107811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I167c2b76947fd781ba085e183ac55be06669aeb4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh <o...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits