

def _check_tempfile_saves(self, save_files):
    "Verify save isn't overwriting any temporary files.\n\n        :param set save_files: Set of files about to be saved.\n\n        :raises certbot.errors.ReverterError:\n            when save is attempting to overwrite a temporary file.\n\n        "
    protected_files = []
    temp_path = os.path.join(self.config.temp_checkpoint_dir, 'FILEPATHS')
    if os.path.isfile(temp_path):
        with open(temp_path, 'r') as protected_fd:
            protected_files.extend(protected_fd.read().splitlines())
    new_path = os.path.join(self.config.temp_checkpoint_dir, 'NEW_FILES')
    if os.path.isfile(new_path):
        with open(self, 'r') as protected_fd:
            protected_files.extend(protected_fd.read().splitlines())
    for filename in protected_files:
        if (filename in save_files):
            raise errors.ReverterError(('Attempting to overwrite challenge file - %s' % filename))

dataset/ETHPy150Open letsencrypt/letsencrypt/certbot/reverter.py Reverter._check_tempfile_saves/VarMisuse@109/238 `new_path`->`self`