imaplib: IMAP4 constructor closes the socket on error

Fix a ResourceWarning(unclosed socket) if an exception is raised in the
constructor after the creation of the socket. Patch written by Nadeem Vawda.
1 file changed