From 67ce01fc625ace5ebef72951fdf59b63af0e9ea6 Mon Sep 17 00:00:00 2001
From: Jeff Peeler <jpeeler@redhat.com>
Date: Fri, 14 Aug 2015 13:57:01 -0400
Subject: [PATCH] Safely check for dictionary key presence

Accessing the key directly when it doesn't exist was yielding a
KeyError.

Change-Id: Ice877b74d46d59f2e9ecff051b09245e9d3744e1
Paritally-Implements: blueprint gate-source-builds
---
 tools/build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build.py b/tools/build.py
index e0309c270d..ac42cac2b7 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -89,7 +89,7 @@ class WorkerThread(Thread):
             image['status'] = "parent_error"
             return
 
-        if image['source']:
+        if 'source' in image:
             self.process_source(image['source'], image['path'])
 
         # Pull the latest image for the base distro only