def delete(self): """ Remove all files in set, both local and remote """ rfn = self.get_filenames() rfn.reverse() try: self.backend.delete(rfn) except Exception: log.Debug(_("BackupSet.delete: missing %s") % [util.ufn(f) for f in rfn]) pass if self.action not in ["collection-status", "replicate"]: local_filename_list = globals.archive_dir_path.listdir() else: local_filename_list = [] for lfn in local_filename_list: pr = file_naming.parse(lfn) if (pr and pr.time == self.time and pr.start_time == self.start_time and pr.end_time == self.end_time): try: globals.archive_dir_path.append(lfn).delete() except Exception: log.Debug(_("BackupSet.delete: missing %s") % [util.ufn(f) for f in lfn]) pass util.release_lockfile()
def delete(self): u""" Remove all files in set, both local and remote """ rfn = self.get_filenames() rfn.reverse() try: self.backend.delete(rfn) except Exception: log.Debug( _(u"BackupSet.delete: missing %s") % [util.fsdecode(f) for f in rfn]) pass if self.action != u"replicate": local_filename_list = config.archive_dir_path.listdir() else: local_filename_list = [] for lfn in local_filename_list: pr = file_naming.parse(lfn) if (pr and pr.time == self.time and pr.start_time == self.start_time and pr.end_time == self.end_time): try: config.archive_dir_path.append(lfn).delete() except Exception: log.Debug( _(u"BackupSet.delete: missing %s") % [util.fsdecode(f) for f in lfn]) pass util.release_lockfile()
def delete(self): """ Remove all files in set, both local and remote """ rfn = self.get_filenames() rfn.reverse() try: self.backend.delete(rfn) except Exception: log.Debug( _("BackupSet.delete: missing %s") % [util.ufn(f) for f in rfn]) pass for lfn in globals.archive_dir.listdir(): pr = file_naming.parse(lfn) if (pr and pr.time == self.time and pr.start_time == self.start_time and pr.end_time == self.end_time): try: globals.archive_dir.append(lfn).delete() except Exception: log.Debug( _("BackupSet.delete: missing %s") % [util.ufn(f) for f in lfn]) pass util.release_lockfile()
def delete(self): """ Remove all files in set, both local and remote """ rfn = self.get_filenames() rfn.reverse() try: self.backend.delete(rfn) except Exception: log.Debug(_("BackupSet.delete: missing %s") % [util.ufn(f) for f in rfn]) pass if self.action not in ["collection-status"]: local_filename_list = globals.archive_dir.listdir() else: local_filename_list = [] for lfn in local_filename_list: pr = file_naming.parse(lfn) if (pr and pr.time == self.time and pr.start_time == self.start_time and pr.end_time == self.end_time): try: globals.archive_dir.append(lfn).delete() except Exception: log.Debug(_("BackupSet.delete: missing %s") % [util.ufn(f) for f in lfn]) pass util.release_lockfile()
def delete(self): """ Remove all files in set, both local and remote """ rfn = self.get_filenames() rfn.reverse() try: self.backend.delete(rfn) except Exception: log.Debug(_("BackupSet.delete: missing %s") % map(util.ufn, rfn)) pass for lfn in globals.archive_dir.listdir(): pr = file_naming.parse(lfn) if (pr and pr.time == self.time and pr.start_time == self.start_time and pr.end_time == self.end_time): try: globals.archive_dir.append(lfn).delete() except Exception: log.Debug(_("BackupSet.delete: missing %s") % map(util.ufn, lfn)) pass util.release_lockfile()