Add return proper result when syncing
authorLiu jue <juex.liu@intel.com>
Mon, 14 Jul 2014 04:26:58 +0000 (12:26 +0800)
committerLin Yang <lin.a.yang@intel.com>
Tue, 15 Jul 2014 07:24:53 +0000 (15:24 +0800)
When rsync to download server, this job should return
proper result

Change-Id: I2779d7b3ea3a9e14a0ffdd41a975361ef0a6d085
Fixes: #2045

job_sync_snapdiff.py

index c1cd501..90c3b00 100755 (executable)
@@ -112,7 +112,8 @@ def sync_world(template_name, repo_name, repo_path, **kwargs):
         return
     with open(os.path.join(reports, 'index.html'), 'w') as fp:
         fp.write(content)
-    sync(sync_out, os.path.join(os.getenv('IMG_SYNC_DEST_BASE'), repo_path))
+    return sync(sync_out, os.path.join(os.getenv('IMG_SYNC_DEST_BASE'), \
+                repo_path))
 
 def main():
     """The main body"""
@@ -187,7 +188,7 @@ def main():
             context['images'].pop(item['name'])
 
     # sync all
-    sync_world('index.html', repo_name, repo_path, **context)
+    return sync_world('index.html', repo_name, repo_path, **context)
 
 if __name__ == '__main__':
     sys.exit(main())