Fix decoding error for git-obs-mapping list 62/108562/1
authorhyokeun <hyokeun.jeon@samsung.com>
Thu, 5 Jan 2017 05:34:35 +0000 (14:34 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Thu, 5 Jan 2017 05:34:38 +0000 (14:34 +0900)
Cause: contents are differ between Mapping V1 and V2
Fix: hard code item counts

Change-Id: Id3b37911b3bf3a3147b9435aedf62f0d3a59567c

job_submit.py

index ec2053f..c3ea444 100755 (executable)
@@ -581,9 +581,10 @@ def main(build_type):
                 }
     submit_info['pre_created'] = []
 
-    for obs_target_prj, obs_stg_prj, obs_pkg, build_cfg in obs_target_prjs:
+    for item in obs_target_prjs:
         enable_build = True
-        if build_cfg.build == 'no':
+        obs_target_prj, obs_stg_prj, obs_pkg = item[0:3]
+        if len(item) >= 4 and item[3].build == 'no':
             print 'Set disable build for %s' % (obs_target_prj)
             enable_build = False
         url = 'ssh://%s:%s' % (os.getenv('GERRIT_HOSTNAME'),