MCPcopy Index your code
hub / github.com/RustPython/RustPython / shutdown

Method shutdown

Lib/imaplib.py:421–434  ·  view source on GitHub ↗

Close I/O established in "open".

(self)

Source from the content-addressed store, hash-verified

419
420
421 def shutdown(self):
422 """Close I/O established in "open"."""
423 self._file.close()
424 try:
425 self.sock.shutdown(socket.SHUT_RDWR)
426 except OSError as exc:
427 # The server might already have closed the connection.
428 # On Windows, this may result in WSAEINVAL (error 10022):
429 # An invalid operation was attempted.
430 if (exc.errno != errno.ENOTCONN
431 and getattr(exc, 'winerror', 0) != 10022):
432 raise
433 finally:
434 self.sock.close()
435
436
437 def socket(self):

Callers 2

__init__Method · 0.95
logoutMethod · 0.95

Calls 2

getattrFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected