From bda393ec7bd28618265c52c6357d261da002bf8a Mon Sep 17 00:00:00 2001 From: Yonghee Han Date: Fri, 15 Apr 2016 10:37:16 +0900 Subject: [PATCH] modify to check sync_status value when Sync function doing Change-Id: I6377d04cbeb651200064284c092926ad03ec4397 --- job_imager.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/job_imager.py b/job_imager.py index b4586d4..d75c979 100755 --- a/job_imager.py +++ b/job_imager.py @@ -283,17 +283,19 @@ def main(): convert_image_dir(os.path.join(sync_src, 'images'), fields['repo'], fields['name']) + sync_status = 'success' for loop in range(2): if sync(sync_src, sync_dest): print "Retry sync %s to %s" % (sync_src, sync_dest) - status = 'failed' + sync_status = 'failed' else: print "Success sync %s to %s" % (sync_src, sync_dest) - status = 'success' + sync_status = 'success' break; - if(status == 'failed'): + if(sync_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) -- 2.7.4