From: Yonghee Han Date: Tue, 12 Apr 2016 07:29:45 +0000 (+0900) Subject: retry sync function because of rsync error X-Git-Tag: submit/trunk/20190927.012743~576^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e205d5e29febcdf759ea9d1023869284db93f37b;p=services%2Fjenkins-scripts.git retry sync function because of rsync error Change-Id: I353a755c25105dbf3e3b0246748ad29233ff178e --- diff --git a/job_imager.py b/job_imager.py index 88b4d81..b4586d4 100755 --- a/job_imager.py +++ b/job_imager.py @@ -283,9 +283,17 @@ def main(): convert_image_dir(os.path.join(sync_src, 'images'), fields['repo'], fields['name']) - if sync(sync_src, sync_dest): + for loop in range(2): + if sync(sync_src, sync_dest): + print "Retry sync %s to %s" % (sync_src, sync_dest) + status = 'failed' + else: + print "Success sync %s to %s" % (sync_src, sync_dest) + status = 'success' + break; + + if(status == 'failed'): print "Error: unable to sync %s to %s" % (sync_src, sync_dest) - status = 'failed' xml_string = get_xml(os.path.join(outdir, build_id), name)