tparse/get_time: hardcode a past date to avoid trouble - amprolla - devuan's apt repo merger HTML git clone git://parazyd.org/amprolla.git DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 2884ba28bb23bd6c46afd4963ed1eb687776d250 DIR parent 22ec2a3634b8eee640a335e8d9f28754509e7024 HTML Author: parazyd <parazyd@dyne.org> Date: Sun, 29 Oct 2017 20:15:32 +0100 parse/get_time: hardcode a past date to avoid trouble Diffstat: M lib/parse.py | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) --- DIR diff --git a/lib/parse.py b/lib/parse.py t@@ -11,6 +11,9 @@ def get_time(date): """ Gets epoch time """ + if not date: + # hardcode if something's amiss + date = 'Sun, 29 Oct 2017 10:00:00 +0200' return time.mktime(time.strptime(date, "%a, %d %b %Y %H:%M:%S %Z"))