From 9d9f98996ec3be7ecd823d44b5a3d6ffb0e2f401 Mon Sep 17 00:00:00 2001 From: Menno Smits Date: Tue, 1 Sep 2015 14:35:58 +1200 Subject: [PATCH] Replaced super call with straight call up to superclass imaplib.IMAP4 isn't subclassed from object in Python 2. --- imapclient/imap4.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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) -- 2.43.0