Skip to content

Commit

Permalink
typo - theres just "result" and "result_info" returned in raw mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Oct 17, 2016
1 parent 797b90f commit 2dfe728
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CloudFlare/cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,13 @@ def _call(self, method, headers,
if self.logger:
self.logger.debug('Response: %s' % (response_data.result))
if self.raw:
## no need to return success, errors, or messages as they return via an exception
result = {}
if 'result' in response_data:
result['result'] = response_data['result']
# theres always a result value
result['result'] = response_data['result']
# theres may not be a result_info on every call
if 'result_info' in response_data:
result['result_info'] = response_data['result_info']
if 'total_count' in response_data:
result['total_count'] = response_data['total_count']
# no need to return success, errors, or messages as they return via an exception
else:
# theres always a result value
result = response_data['result']
Expand Down

0 comments on commit 2dfe728

Please sign in to comment.