Handle the case where an empty response is returned (possibly related to Issue #1086)

This commit is contained in:
Pete 2013-02-09 14:57:39 +00:00 committed by sneakypete81
parent 0ef3abe79e
commit eeffec991f

View file

@ -144,6 +144,8 @@ class OpenPhotoHttp:
@staticmethod
def _result_to_list(result):
""" Handle the case where the result contains no items """
if not result:
return []
if result[0]["totalRows"] == 0:
return []
else: