Skip to content

Commit

Permalink
Properly handle empty dict in cryptocompare query response
Browse files Browse the repository at this point in the history
  • Loading branch information
LefterisJP committed Oct 25, 2019
1 parent 6f9d300 commit 947155a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rotkehlchen/inquirer.py
Expand Up @@ -46,8 +46,8 @@ def query_cryptocompare_for_fiat_price(asset: Asset) -> Price:
# If there is an error in the response skip this token
if 'USD' not in resp:
error_message = ''
if resp['Response'] == 'Error':
error_message = resp['Message']
if resp.get('Response', None) == 'Error':
error_message = resp.get('Message', '')

log.error(
'Cryptocompare usd price query failed',
Expand Down

0 comments on commit 947155a

Please sign in to comment.