Fix download_num in prerelease 04/101204/1
authorhyokeun <hyokeun.jeon@samsung.com>
Wed, 30 Nov 2016 11:39:04 +0000 (20:39 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Wed, 30 Nov 2016 11:39:04 +0000 (20:39 +0900)
Change-Id: I23e995573229010943f8de34a1366c51b312ba39

job_pre_release_obs.py

index e4a3a35..9e8560c 100755 (executable)
@@ -133,7 +133,11 @@ def make_repo(project, repo, backenddb, base_url, base_path,
     """
     images_count = 0
 
-    current_download_num = build.get_info(project).get('download_num') or int(1)
+    build_info = build.get_info(project)
+    if build_info.get('download_num'):
+        current_download_num = build_info.get('download_num') + 1
+    else:
+        current_download_num = int(1)
     print 'Current download_num = %d' % current_download_num
 
     # Make build id from latest snapshot + project suffix