[reddit] fix issue with datetime errors

This commit is contained in:
Mike Fährmann
2017-07-02 08:13:56 +02:00
parent 80c2e03aaa
commit 85696d0b3b

View File

@@ -238,7 +238,8 @@ class RedditAPI():
try:
ts = int(datetime.datetime.strptime(ts, fmt).timestamp())
except ValueError as exc:
self.warning("Unable to parse '%s': %s", key, exc)
self.log.warning("Unable to parse '%s': %s", key, exc)
ts = default
return ts
def _parse_id(self, key, default):