modify to check sync_status value when Sync function doing 35/66035/1
authorYonghee Han <onstudy@samsung.com>
Fri, 15 Apr 2016 01:37:16 +0000 (10:37 +0900)
committerYonghee Han <onstudy@samsung.com>
Fri, 15 Apr 2016 01:37:16 +0000 (10:37 +0900)
Change-Id: I6377d04cbeb651200064284c092926ad03ec4397

job_imager.py

index b4586d4..d75c979 100755 (executable)
@@ -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)