From 160a7980f9f758f65d84ab996d9b5d46e6a5ef1b Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Sat, 23 Jul 2016 13:30:08 -0400 Subject: [PATCH] handle unparsables (ValueError) as well as None type (TypeError) --- newsreap/lib/codecs/CodecArticleIndex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newsreap/lib/codecs/CodecArticleIndex.py b/newsreap/lib/codecs/CodecArticleIndex.py index 93bea50..b8f5e50 100644 --- a/newsreap/lib/codecs/CodecArticleIndex.py +++ b/newsreap/lib/codecs/CodecArticleIndex.py @@ -131,7 +131,7 @@ def detect(self, line, relative=True): # We weren't able to parse the date article_date = parse(result.group('date'), fuzzy=True) - except TypeError: + except (ValueError, TypeError): # It would be great if users of the product would email # us these errors so we can work on making them better logger.warning(