def __del__ ( self ) : # __del__ can be invoked before __init__ has completed. if hasattr ( self , '_encoded_stream' ) : self . _encoded_stream . close ( ) self . _encoded_stream = None super ( EncodedStreamFileEntry , self ) . __del__ ( )
python remove file after read stream
Cleans up the file entry .
def __del__(self):
    """Cleans up the file entry."""
    # __del__ can be invoked before __init__ has completed.
    if hasattr(self, '_encoded_stream'):
      self._encoded_stream.close()
      self._encoded_stream = None

    super(EncodedStreamFileEntry, self).__del__()