From 3cc3322e07aae35227f0bee6e952e2e11a52ac18 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Wed, 2 Dec 2015 10:46:44 +0100 Subject: [PATCH] [Price Feed] Fix BTC38 - bad if-condition --- scripts/pricefeeds/feedsources.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/pricefeeds/feedsources.py b/scripts/pricefeeds/feedsources.py index 0d60e1a2..e01a38a6 100644 --- a/scripts/pricefeeds/feedsources.py +++ b/scripts/pricefeeds/feedsources.py @@ -133,9 +133,8 @@ def fetch(self): params = { 'c': coin.lower(), 'mk_type': market.lower() } response = requests.get(url=url, params=params, headers=_request_headers, timeout=10 ) result = response.json() - if coin.lower() in result : - feed[market][coin] = { "price" : (float(result["ticker"]["last"])), - "volume" : (float(result["ticker"]["vol"]/result["ticker"]["last"])*self.scaleVolumeBy) } + feed[market][coin] = { "price" : (float(result["ticker"]["last"])), + "volume" : (float(result["ticker"]["vol"]/result["ticker"]["last"])*self.scaleVolumeBy) } except Exception as e: print("\nError fetching results from {1}! ({0})".format(str(e), type(self).__name__)) if not self.allowFailure: