Skip to content

Commit 1c5cca3

Browse files
authored
Merge pull request #90 from matyasselmeci/osglocation
Search for caches.json under $OSG_LOCATION if set; needed for tarball client
2 parents a7f0429 + 4cbefc0 commit 1c5cca3

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
@@ -379,9 +379,10 @@ def get_ips(name):
379379
return ipv4s + ipv6s
380380

381381
def get_best_stashcache():
382+
prefix = os.environ.get("OSG_LOCATION", "")
382383
cache_files = [os.path.join(os.path.dirname(os.path.realpath(__file__)), "caches.json"),
383-
"/etc/stashcache/caches.json",
384-
"/usr/share/stashcache/caches.json"]
384+
os.path.join(prefix, "/etc/stashcache/caches.json"),
385+
os.path.join(prefix, "/usr/share/stashcache/caches.json")]
385386
for cache_file in cache_files:
386387
if os.path.isfile(cache_file):
387388
with open(cache_file, 'r') as f:

0 commit comments

Comments
 (0)