def run(self): """ Check the given repository and remove old increments """ action_time = self._get_parsed_time(self.values.older_than) if action_time is None: return 1 manage.delete_earlier_than(self.source.base_dir, action_time) return 0
def run(self): """ Check the given repository and remove old increments """ action_time = self._get_parsed_time(self.values.older_than) if action_time is None: return 1 elif action_time < 0: # no increment is old enough return 0 if Globals.get_api_version() < 201: manage.delete_earlier_than(self.repo.base_dir, action_time) else: self.repo.remove_increments_older_than(action_time) return 0