Don't accept totally bogus dates
Yanmin Zhang committed a patch (09f2724a786f76475ef2985cf84f5359c553aade) which claims to have been written in August, 2030. Code that bleeding-edge makes gitdm confused, so pretend it's just normal, contemporary stuff.
This commit is contained in:
parent
dd091c4268
commit
558dbe1cbe
5
gitdm
5
gitdm
@ -19,7 +19,7 @@ from patterns import *
|
||||
class patch:
|
||||
pass
|
||||
|
||||
|
||||
Today = datetime.date.today()
|
||||
#
|
||||
# Control options.
|
||||
#
|
||||
@ -181,6 +181,9 @@ def grabpatch():
|
||||
if m:
|
||||
dt = rfc822.parsedate(m.group (2))
|
||||
p.date = datetime.date (dt[0], dt[1], dt[2])
|
||||
if p.date > Today:
|
||||
sys.stderr.write ('Funky date: %s\n' % p.date)
|
||||
p.date = Today
|
||||
continue
|
||||
#
|
||||
# If we have a file filter, check for file lines.
|
||||
|
Loading…
Reference in New Issue
Block a user