Skip to content

Commit bab77b6

Browse files
committed
Search for caches.json under $OSG_LOCATION if set; needed for tarball client
1 parent 36c0b50 commit bab77b6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

bin/stashcp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,10 @@ def get_ips(name):
377377
return ipv4s + ipv6s
378378

379379
def get_best_stashcache():
380+
prefix = os.environ.get("OSG_LOCATION", "")
380381
cache_files = [os.path.join(os.path.dirname(os.path.realpath(__file__)), "caches.json"),
381-
"/etc/stashcache/caches.json",
382-
"/usr/share/stashcache/caches.json"]
382+
os.path.join(prefix, "/etc/stashcache/caches.json"),
383+
os.path.join(prefix, "/usr/share/stashcache/caches.json")]
383384
for cache_file in cache_files:
384385
if os.path.isfile(cache_file):
385386
with open(cache_file, 'r') as f:

0 commit comments

Comments
 (0)