diff options
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 6469df2..df35cb1 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -222,9 +222,7 @@ class IMAP4: def _create_socket(self): - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.connect((self.host, self.port)) - return sock + return socket.create_connection((self.host, self.port)) def open(self, host = '', port = IMAP4_PORT): """Setup connection to remote server on "host:port" |