From ae98cb6173c21612c70a1eff98f6edafd644fe80 Mon Sep 17 00:00:00 2001 From: hyokeun Date: Wed, 2 Aug 2017 15:38:32 +0900 Subject: [PATCH] Bugfix: Check null before inserting item Change-Id: I86eeb71067039e9209413ce6aee5d7875fc5cbbd --- job_request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/job_request.py b/job_request.py index a3c7c06..2e50f40 100644 --- a/job_request.py +++ b/job_request.py @@ -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']) -- 2.7.4