Protect against no matches for an upload
It's possible that one of the children for an upload znode has been deleted by the time we request that child's znode data. Protect against that by adding a check for None returned from getImageUpload(). Change-Id: Ifd4e26baf480420d649e7ae85b43a57bf5338f96
This commit is contained in:
parent
6b949f8abb
commit
feaa6ad51b
@ -1037,9 +1037,11 @@ class ZooKeeper(object):
|
||||
if upload == 'lock':
|
||||
continue
|
||||
data = self.getImageUpload(image, build_number, provider, upload)
|
||||
if not data:
|
||||
continue
|
||||
if states is None:
|
||||
matches.append(data)
|
||||
elif data and data.state in states:
|
||||
elif data.state in states:
|
||||
matches.append(data)
|
||||
|
||||
return matches
|
||||
|
Loading…
x
Reference in New Issue
Block a user