(self)
return exit_status
Shred file content
Shred file content
Shred file content
def _shred(self):
        """Shred file content"""
        exit_status = 0
        self._verify_keystore()
        try:
            size = FileUtil(self.keystore_file).size()
            with open(self.keystore_file, "rb+") as filep:
                filep.write(b" " * size)
        except (IOError, OSError):
            exit_status = 1
            return exit_status
        return exit_status
def _shred ( self ) : exit_status = 0 self . _verify_keystore ( ) try : size = FileUtil ( self . keystore_file ) . size ( ) with open ( self . keystore_file , "rb+" ) as filep : filep . write ( b" " * size ) except ( IOError , OSError ) : exit_status = 1 return exit_status return exit_status