From 6ffa32b9d9e402d2967e4306c0cc397998382581 Mon Sep 17 00:00:00 2001 From: Troy Comi Date: Wed, 22 Feb 2023 15:52:49 -0500 Subject: [PATCH] Fix is_run error with local, group jobs Ran into a bug where executing a workflow locally causes a crash with group jobs. ``` if self.workflow.verbose or (job.is_run and not job.is_group()): ^^^^^^^^^^ AttributeError: 'GroupJob' object has no attribute 'is_run' ``` Swapping the order of the checks fixes this issue; not sure why the CI didn't catch this bug. --- snakemake/executors/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snakemake/executors/__init__.py b/snakemake/executors/__init__.py index a528df81f..2de456f8a 100644 --- a/snakemake/executors/__init__.py +++ b/snakemake/executors/__init__.py @@ -674,7 +674,7 @@ def _callback(self, job, callback, error_callback, future): error_callback(job) except (Exception, BaseException) as ex: self.print_job_error(job) - if self.workflow.verbose or (job.is_run and not job.is_group()): + if self.workflow.verbose or (not job.is_group() and job.is_run): print_exception(ex, self.workflow.linemaps) error_callback(job)