Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ecl/virtual_network_appliance/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class HttpException(exceptions.HttpException):

def _get_exception_message(self, message=None):
try:
content = json.loads(self.response._content)
content = json.loads(self.response._content.decode('utf-8'))

# API-GW
if 'fault' in content and 'faultstring' in content['fault']:
Expand All @@ -21,7 +21,7 @@ def _get_exception_message(self, message=None):

# In VNA API, we need to handle both "cause" and "message" key
# as API error.
k = content.keys()
k = list(content.keys())
if 'message' in k and 'cause' not in k:
return content['message']
if 'cause' in k and 'message' not in k:
Expand Down