(self)
Closes the stream.
Closes the stream.
Closes the stream .
def close(self):
        """
        Closes the stream.
        """
        self.acquire()
        try:
            try:
                if self.stream:
                    try:
                        self.flush()
                    finally:
                        stream = self.stream
                        self.stream = None
                        if hasattr(stream, "close"):
                            stream.close()
            finally:
                # Issue #19523: call unconditionally to
                # prevent a handler leak when delay is set
                StreamHandler.close(self)
        finally:
            self.release()
def close ( self ) : self . acquire ( ) try : try : if self . stream : try : self . flush ( ) finally : stream = self . stream self . stream = None if hasattr ( stream , "close" ) : stream . close ( ) finally : # Issue #19523: call unconditionally to # prevent a handler leak when delay is set StreamHandler . close ( self ) finally : self . release ( )