diff options
Diffstat (limited to 'tempest_lib/common/rest_client.py')
-rw-r--r-- | tempest_lib/common/rest_client.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tempest_lib/common/rest_client.py b/tempest_lib/common/rest_client.py index d833d5f..c5886e6 100644 --- a/tempest_lib/common/rest_client.py +++ b/tempest_lib/common/rest_client.py @@ -461,7 +461,9 @@ class RestClient(object): # } try: # Ensure there are not more than one top-level keys - if len(body.keys()) > 1: + # NOTE(freerunner): Ensure, that JSON is not nullable to + # to prevent StopIteration Exception + if len(body.keys()) != 1: return body # Just return the "wrapped" element first_key, first_item = six.next(six.iteritems(body)) |