Bugfix: Check null before inserting item 70/141970/1
authorhyokeun <hyokeun.jeon@samsung.com>
Wed, 2 Aug 2017 06:38:32 +0000 (15:38 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Wed, 2 Aug 2017 06:38:32 +0000 (15:38 +0900)
Change-Id: I86eeb71067039e9209413ce6aee5d7875fc5cbbd

job_request.py

index a3c7c06..2e50f40 100644 (file)
@@ -128,7 +128,8 @@ def obs_git_data(event_fields):
             # when entry['GIT_PROJECTS'] is '***' executes else.
             if entry['GIT_PROJECTS'].startswith('[') and \
                     entry['GIT_PROJECTS'].endswith(']'):
-                projects = entry['GIT_PROJECTS'][1:-1].split(', ')
+                if entry['GIT_PROJECTS'][1:-1]:
+                    projects = entry['GIT_PROJECTS'][1:-1].split(', ')
             else:
                 projects.append(entry['GIT_PROJECTS'])