Merge "fix bot to actually use super()"

This commit is contained in:
Jenkins 2014-01-16 21:11:43 +00:00 committed by Gerrit Code Review
commit 96d4155bac

View File

@ -40,7 +40,6 @@ openstack-qa:
import argparse import argparse
import ConfigParser import ConfigParser
import daemon import daemon
import irc.bot
import logging import logging
import logging.config import logging.config
import os import os
@ -48,6 +47,9 @@ import threading
import time import time
import yaml import yaml
import irc.bot
try: try:
import daemon.pidlockfile import daemon.pidlockfile
pid_file_module = daemon.pidlockfile pid_file_module = daemon.pidlockfile
@ -61,8 +63,8 @@ except Exception:
class RecheckWatchBot(irc.bot.SingleServerIRCBot): class RecheckWatchBot(irc.bot.SingleServerIRCBot):
def __init__(self, channels, nickname, password, server, port=6667, def __init__(self, channels, nickname, password, server, port=6667,
server_password=None): server_password=None):
irc.bot.SingleServerIRCBot.__init__( super(RecheckWatchBot, self).__init__(
self, [(server, port, server_password)], nickname, nickname) [(server, port, server_password)], nickname, nickname)
self.channel_list = channels self.channel_list = channels
self.nickname = nickname self.nickname = nickname
self.password = password self.password = password
@ -96,7 +98,7 @@ class RecheckWatchBot(irc.bot.SingleServerIRCBot):
class RecheckWatch(threading.Thread): class RecheckWatch(threading.Thread):
def __init__(self, ircbot, channel_config, username, def __init__(self, ircbot, channel_config, username,
queries, host, key, commenting=True): queries, host, key, commenting=True):
threading.Thread.__init__(self) super(RecheckWatch, self).__init__()
self.ircbot = ircbot self.ircbot = ircbot
self.channel_config = channel_config self.channel_config = channel_config
self.log = logging.getLogger('recheckwatchbot') self.log = logging.getLogger('recheckwatchbot')