This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: imaplib IMAP4_SSL shutdown gets socket error in py 3.2
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: jh45, pitrou
Priority: normal Keywords:

Created on 2011-02-06 23:42 by jh45, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg128092 - (view) Author: John (jh45) Date: 2011-02-06 23:42
windows vista
Python 3.2 rc2

situation: 
connected to gmail with IMAP4_SSL, did stuff, and finally IMAP4_SSL.close() 
IMAP4_SSL.logout()
IMAP4_SSL.shutdown() 

shutdown() gets this error:

socket.error: [Errno 10038] An operation was attempted on something that is not a socket

No problem in Python 3.1.2

For now I don't use shutdown(), and hope the socket is closed automatically when the interpreter exits (as open files are).

-- jh
msg128093 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-02-07 00:05
> IMAP4_SSL.close() 
> IMAP4_SSL.logout()
> IMAP4_SSL.shutdown() 

logout() already calls shutdown() for you and closes the socket, so you don't have to do it yourself.
History
Date User Action Args
2022-04-11 14:57:12adminsetgithub: 55345
2011-02-07 15:34:11pitrousetstatus: pending -> closed
2011-02-07 00:05:06pitrousetstatus: open -> pending

nosy: + pitrou
messages: + msg128093

resolution: not a bug
2011-02-06 23:42:39jh45create