(self)
Close I/O established in "open".
Close I/O established in "open".
Close I / O established in open .
def shutdown(self):
        """Close I/O established in "open"."""
        self.file.close()
        try:
            self.sock.shutdown(socket.SHUT_RDWR)
        except OSError as exc:
            # The server might already have closed the connection.
            # On Windows, this may result in WSAEINVAL (error 10022):
            # An invalid operation was attempted.
            if (exc.errno != errno.ENOTCONN
               and getattr(exc, 'winerror', 0) != 10022):
                raise
        finally:
            self.sock.close()
def shutdown ( self ) : self . file . close ( ) try : self . sock . shutdown ( socket . SHUT_RDWR ) except OSError as exc : # The server might already have closed the connection. # On Windows, this may result in WSAEINVAL (error 10022): # An invalid operation was attempted. if ( exc . errno != errno . ENOTCONN and getattr ( exc , 'winerror' , 0 ) != 10022 ) : raise finally : self . sock . close ( )