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
This commit is contained in:
Jeff Peeler 2015-08-14 13:57:01 -04:00
parent df54c15145
commit 67ce01fc62

View File

@ -89,7 +89,7 @@ class WorkerThread(Thread):
image['status'] = "parent_error" image['status'] = "parent_error"
return return
if image['source']: if 'source' in image:
self.process_source(image['source'], image['path']) self.process_source(image['source'], image['path'])
# Pull the latest image for the base distro only # Pull the latest image for the base distro only