Skip to content

Commit f7df5a4

Browse files
committed
Check that there are more caches to try
1 parent ab039f9 commit f7df5a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stashcp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def download_xrootd(sourceFile, destination, debug, payload):
333333
status = "First Cache Success"
334334
payload['cache'] = cache
335335

336-
if xrd_exit != '0': # pull from second nearest cache
336+
if xrd_exit != '0' and len(nearest_cache_list) >= 2: # pull from second nearest cache
337337
cache = nearest_cache_list[1]
338338
logging.info("XrdCP from cache failed on %s, pulling from second nearest cache %s", nearest_cache, cache)
339339
xrd_exit = timed_transfer(filename=sourceFile, debug=debug, cache=cache, destination=destination)

0 commit comments

Comments
 (0)