diff --git a/jenkins/complete_rpms_actions.py b/jenkins/complete_rpms_actions.py index 52a6ceaca3e2b6e93334ec6ff307d7adbc2bd783..60f64fbb0ad47408ea2c1165b13bcf2fc6c3271b 100755 --- a/jenkins/complete_rpms_actions.py +++ b/jenkins/complete_rpms_actions.py @@ -72,7 +72,10 @@ def copy_to_eos(from_mask, to, dryrun): try: subprocess.check_output(shlex.split(command), stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: - if e.returncode == 54: + eossrv = to.rsplit('//', 1)[0] + eosfnm = '/' + to.rsplit('//', 1)[1] + os.path.basename(from_file) + rc = subprocess.run(['xrdfs', eossrv, 'ls', '-1', eosfnm]) + if rc.returncode == 0: print("\t[EXISTS]") break else: