From: Menno Smits Date: Tue, 1 Sep 2015 02:35:58 +0000 (+1200) Subject: Replaced super call with straight call up to superclass X-Git-Tag: 1.0.0~1^2~30 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=9d9f98996ec3be7ecd823d44b5a3d6ffb0e2f401;p=imapclient.git Replaced super call with straight call up to superclass imaplib.IMAP4 isn't subclassed from object in Python 2. --- diff --git a/imapclient/imap4.py b/imapclient/imap4.py index a817f1e..5e71645 100644 --- a/imapclient/imap4.py +++ b/imapclient/imap4.py @@ -8,10 +8,9 @@ import socket class IMAP4WithTimeout(imaplib.IMAP4): - def __init__(self, address, port, connection_timeout): - self._connection_timeout = connection_timeout - super(IMAP4WithTimeout, self).__init__(address, port) + def __init__(self, address, port, timeout): + self._timeout = timeout + imaplib.IMAP4.__init__(self, address, port) def _create_socket(self): - return socket.create_connection((self.host, self.port), - self._connection_timeout) + return socket.create_connection((self.host, self.port), self._timeout)