From a82f0e39c88315d814e56c64183558f3795333bd Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Tue, 21 Apr 2026 14:09:36 -0700 Subject: [PATCH] Use new has_repo_config API to check if the root is a butler repo This checks for the butler.yaml as well as directory existence and prevents some edge cases where the directory is still there but files have been cleared out. --- python/lsst/pipe/base/simple_pipeline_executor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/lsst/pipe/base/simple_pipeline_executor.py b/python/lsst/pipe/base/simple_pipeline_executor.py index 50a01dcd2..e9a9bf9a4 100644 --- a/python/lsst/pipe/base/simple_pipeline_executor.py +++ b/python/lsst/pipe/base/simple_pipeline_executor.py @@ -29,7 +29,6 @@ __all__ = ("SimplePipelineExecutor",) -import os from collections.abc import Iterable, Iterator, Mapping from typing import Any @@ -507,7 +506,7 @@ def use_local_butler( quantum graph or their original `~lsst.daf.butler.CollectionType.RUN` collections. """ - if not os.path.exists(root): + if not Butler.has_repo_config(root): Butler.makeRepo(root) out_butler = Butler.from_config(root, writeable=True)