def _revert(self, config_dest): backup_path = self._build_backup_path(config_dest) if os.path.isfile(backup_path): move_file(backup_path, config_dest)
def _backup(self, config_dest): if os.path.isfile(config_dest): backup_path = self._build_backup_path(config_dest) move_file(config_dest, backup_path)