From 14e9ee55284c3250d73b84fb77fbaa64f37a2f25 Mon Sep 17 00:00:00 2001 From: Robert Lupton the Good Date: Sun, 13 Nov 2022 13:47:52 -0500 Subject: [PATCH] Search for user tag chainFile in main repo if needs be If it's writeable that's where local declarations go, and the tags need to be in the same place --- python/eups/db/Database.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/python/eups/db/Database.py b/python/eups/db/Database.py index b2848f29..5e811986 100644 --- a/python/eups/db/Database.py +++ b/python/eups/db/Database.py @@ -535,18 +535,18 @@ def getChainFile(self, tag, productName, searchUserDB=False): if is_string(tag): tag = eups.tags.Tag(tag) - pdirs = [] + tfile = self._tagFileInDir(pdir, tag.name) + if os.path.exists(tfile): + return ChainFile(tfile) + + # not found; user tags may be in the userDB if searchUserDB and tag.isUser(): for d in self._getUserTagDb(values=True): if d: - pdirs.append(self._productDir(productName, d)) - else: - pdirs.append(pdir) - - for pdir in pdirs: - tfile = self._tagFileInDir(pdir, tag.name) - if os.path.exists(tfile): - return ChainFile(tfile) + pdir = self._productDir(productName, d) + tfile = self._tagFileInDir(pdir, tag.name) + if os.path.exists(tfile): + return ChainFile(tfile) return None