Re-fix IrcDriver, which actually does need the args to __init__

This commit is contained in:
James Vega 2009-01-28 05:31:45 +00:00
parent feeded6135
commit 10342acd11
2 changed files with 4 additions and 4 deletions

View File

@ -48,8 +48,8 @@ from supybot.utils.iter import imap
class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
def __init__(self, irc):
self.irc = irc
self.__parent = super(SocketDriver, self)
self.__parent.__init__(irc)
drivers.IrcDriver.__init__(self, irc)
drivers.ServersMixin.__init__(self, irc)
self.conn = None
self.servers = ()
self.eagains = 0
@ -77,7 +77,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
def _getNextServer(self):
oldServer = getattr(self, 'currentServer', None)
server = self.__parent._getNextServer()
server = drivers.ServersMixin._getNextServer(self)
if self.currentServer != oldServer:
self.resetDelay()
return server

View File

@ -49,7 +49,7 @@ class IrcDriver(object):
"""Base class for drivers."""
def __init__(self, *args, **kwargs):
add(self.name(), self)
super(IrcDriver, self).__init__()
super(IrcDriver, self).__init__(*args, **kwargs)
def run(self):
raise NotImplementedError