Skip to content

Commit

Permalink
handle unparsables (ValueError) as well as None type (TypeError)
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Jul 23, 2016
1 parent 2979412 commit 160a798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion newsreap/lib/codecs/CodecArticleIndex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 160a798

Please sign in to comment.