From 4536278383aa67f9faf2120f068e9dfa601cf5ee Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Thu, 25 Aug 2016 17:56:03 -0400 Subject: [PATCH] Widen the search for bad quotes --- metrik/__init__.py | 2 +- metrik/tasks/tradeking.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metrik/__init__.py b/metrik/__init__.py index 28f4b13..602e0e8 100644 --- a/metrik/__init__.py +++ b/metrik/__init__.py @@ -1,2 +1,2 @@ -__version__ = '0.3.5' +__version__ = '0.3.6' __release__ = __version__ \ No newline at end of file diff --git a/metrik/tasks/tradeking.py b/metrik/tasks/tradeking.py index 59df70a..244cf9a 100644 --- a/metrik/tasks/tradeking.py +++ b/metrik/tasks/tradeking.py @@ -59,8 +59,8 @@ class Tradeking1mTimesales(MongoCreateTask): quotes = json_data['response']['quotes']['quote'] def format_quote(quote): - if quote == '': - logging.warning('Empty quote for symbol {}'.format(symbol)) + if type(quote) != dict: + logging.warning('Bad quote for symbol {}: {}'.format(symbol, quote)) return {} else: return {