From 52f4d14bb425b7490b369c018c74950dff6c001f Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Mon, 29 Jan 2024 16:30:15 +0100 Subject: [PATCH] address flake8-bugbear suggestions --- cwltool/task_queue.py | 4 ++-- tests/test_js_sandbox.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cwltool/task_queue.py b/cwltool/task_queue.py index eed705269c..79c23b9826 100644 --- a/cwltool/task_queue.py +++ b/cwltool/task_queue.py @@ -55,8 +55,8 @@ def _task_queue_func(self) -> None: return try: task() - except BaseException as e: - _logger.exception("Unhandled exception running task") + except BaseException as e: # noqa: B036 + _logger.exception("Unhandled exception running task", exec_info=e) self.error = e finally: with self.lock: diff --git a/tests/test_js_sandbox.py b/tests/test_js_sandbox.py index e3d1d102ff..f4839e8a06 100644 --- a/tests/test_js_sandbox.py +++ b/tests/test_js_sandbox.py @@ -65,7 +65,7 @@ def hide_nodejs(temp_dir: Path) -> str: os.symlink(os.path.join(dirname, entry), new_dir / entry) paths.append(str(new_dir)) dirname_path = Path(dirname) - for path in paths: + for path in list(paths): if Path(path).resolve() == dirname_path: paths.remove(path) return ":".join(paths)