Merge pull request #1402 from coreos-inc/clairbugfixes

Fix handling of Clair notifications without `New` block
This commit is contained in:
josephschorr 2016-04-22 15:11:51 -04:00
commit d63ec8c6b0
2 changed files with 41 additions and 0 deletions

View file

@ -18,6 +18,10 @@ def process_notification_data(notification_data):
""" Processes the given notification data to spawn vulnerability notifications as necessary.
Returns whether the processing succeeded.
"""
if not 'New' in notification_data:
# Nothing to do.
return True
new_data = notification_data['New']
old_data = notification_data.get('Old', {})