Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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()
Exemplo n.º 4
0
    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()