Filter empty messages when creating claims in Swift

Messages can be removed while a claim is created, resulting in an empty
body returned from Swift. This ignores those messages.

Change-Id: I7f6500c743449abd4ce7adb6f361d31a6b8439f8
This commit is contained in:
Thomas Herve 2017-02-17 13:46:14 +01:00
parent d27e784cfa
commit f81dd19d48

View File

@ -96,6 +96,8 @@ def _filter_messages(messages, filters, marker, get_object, list_objects,
if exc.http_status == 404:
continue
raise
if not obj:
continue
obj = jsonutils.loads(obj)
for should_skip in filters:
if should_skip(obj, headers):