From eeffec991fa9d03f9e83cad300bf487b31e90d35 Mon Sep 17 00:00:00 2001 From: Pete Date: Sat, 9 Feb 2013 14:57:39 +0000 Subject: [PATCH] Handle the case where an empty response is returned (possibly related to Issue #1086) --- openphoto/openphoto_http.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openphoto/openphoto_http.py b/openphoto/openphoto_http.py index 2933d43..82d11bb 100644 --- a/openphoto/openphoto_http.py +++ b/openphoto/openphoto_http.py @@ -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: