def repair(self): ''' Attempt to repair a database after setting paranoid checks still results in an error. :throws DatabaseException: If an error has occurred ''' options = self.get_open_options() try: error = new_native_string() LDB.leveldb_repair_db(options, self.filename, get_reference_to(error)) self.handle_error(error) finally: if LDB and options: LDB.leveldb_options_destroy(options) self.close()