Fix handling of Clair notifications without New block

Fixes #1398
This commit is contained in:
Joseph Schorr 2016-04-22 13:05:34 -04:00
parent 460ccf2dfd
commit 3f8d51ebd7
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', {})