Skip to content

Commit 137102a

Browse files
committed
Make stashcp more quiet
1 parent dc6c2fc commit 137102a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

bin/stashcp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def download_xrootd(sourceFile, destination, debug, payload):
245245
payload['cache'] = cache
246246

247247
else: #pull from origin
248-
logging.warning("XrdCP from cache failed on %s, pulling from main redirector", nearest_cache)
248+
logging.info("XrdCP from cache failed on %s, pulling from main redirector", nearest_cache)
249249
cache = main_redirector
250250
xrd_exit=timed_transfer(filename=sourceFile, cache=cache, debug=debug, destination=destination)
251251

@@ -450,7 +450,11 @@ def timed_transfer(filename, destination, cache, debug=False, ):
450450
filename="./"+filename.split("/")[-1]
451451
if os.path.isfile(filename):
452452
os.remove(filename)
453-
xrdcp=subprocess.Popen([command ],shell=True,stdout=subprocess.PIPE)
453+
454+
if debug:
455+
xrdcp=subprocess.Popen([command ],shell=True,stdout=subprocess.PIPE)
456+
else:
457+
xrdcp=subprocess.Popen([command ],shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE)
454458

455459
xrdcp.communicate()
456460
xrd_exit=xrdcp.returncode

0 commit comments

Comments
 (0)