From 34744c1322996c76beb0b3f5f4a9eb71a3f6eca7 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 13 Jan 2014 14:41:00 -0500 Subject: [PATCH] fix bot to actually use super() there was total craziness in not just using a super upcall on initializing the bot. Remove that. Change-Id: I888257a4b41b65220b7520ba53b0753850b30dfd --- elastic_recheck/bot.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/elastic_recheck/bot.py b/elastic_recheck/bot.py index 607caabc..65aced0b 100755 --- a/elastic_recheck/bot.py +++ b/elastic_recheck/bot.py @@ -40,7 +40,6 @@ openstack-qa: import argparse import ConfigParser import daemon -import irc.bot import logging import logging.config import os @@ -48,6 +47,9 @@ import threading import time import yaml +import irc.bot + + try: import daemon.pidlockfile pid_file_module = daemon.pidlockfile @@ -61,8 +63,8 @@ except Exception: class RecheckWatchBot(irc.bot.SingleServerIRCBot): def __init__(self, channels, nickname, password, server, port=6667, server_password=None): - irc.bot.SingleServerIRCBot.__init__( - self, [(server, port, server_password)], nickname, nickname) + super(RecheckWatchBot, self).__init__( + [(server, port, server_password)], nickname, nickname) self.channel_list = channels self.nickname = nickname self.password = password @@ -96,7 +98,7 @@ class RecheckWatchBot(irc.bot.SingleServerIRCBot): class RecheckWatch(threading.Thread): def __init__(self, ircbot, channel_config, username, queries, host, key, commenting=True): - threading.Thread.__init__(self) + super(RecheckWatch, self).__init__() self.ircbot = ircbot self.channel_config = channel_config self.log = logging.getLogger('recheckwatchbot')