def on_task_output(self, task, config): """Task handler for archive_extract""" if isinstance(config, bool) and not config: return config = self.prepare_config(config) archiveutil.rarfile_set_tool_path(config) archiveutil.rarfile_set_path_sep(os.path.sep) for entry in task.accepted: self.handle_entry(entry, config)
def on_task_filter(self, task, config): """ Task handler for archives """ if isinstance(config, bool) and not config: return config = self.prepare_config(config) utils.rarfile_set_tool_path(config) for entry in task.entries: archive_path = entry.get('location', '') entry.accept() if utils.is_archive( str(archive_path)) else entry.reject()
def on_task_filter(self, task, config): """ Task handler for archives """ if isinstance(config, bool) and not config: return config = self.prepare_config(config) utils.rarfile_set_tool_path(config) for entry in task.entries: archive_path = entry.get('location', '') if utils.is_archive(archive_path): entry.accept() else: entry.reject()