ABS null check
authorhyokeun <hyokeun.jeon@samsung.com>
Tue, 26 Sep 2017 23:46:17 +0000 (08:46 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Tue, 26 Sep 2017 23:46:17 +0000 (08:46 +0900)
Change-Id: I9afaef6d64909b3b697ac2447dfac774f2db20ce

abs/job_abs_build.py

index 147de00..c38d984 100755 (executable)
@@ -344,6 +344,8 @@ def fetch_source(gerrit_env, src_root, project, branch=None, tag=None, patchset=
 
     if build_check is not None:
         tag = retrieve_last_accepted_tag(working_git, project, profile=profile, obs_project=obs_project)
+        if tag is None:
+            return None, None
         print 'Force to checkout build check for [%s]' % tag
 
     if tag is None:
@@ -418,6 +420,7 @@ def generate_spec_file(tizen_studio, src_git, prop, data):
     group = ''
     sdk_license = prop.get('sdk_license')
     summary = ''
+    license = ''
     if os.path.isdir(os.path.join(src_git.path, 'packaging')):
         for filename in os.listdir(os.path.join(src_git.path, 'packaging')):
             if re.match('.*\.spec', filename):
@@ -640,6 +643,8 @@ def start_build(fields):
                                     build_check=data.get('buildcheck'), \
                                     profile=data.get('profile'), \
                                     obs_project=data.get('obs_project'))
+    if src_git is None or int_tag is None:
+        return 1
     print 'Got tag: [%s]' % int_tag
 
     # Find package name from spec file