File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def validate_on_or_after(not_on_or_after, slack):
91
91
nooa = calendar .timegm (time_util .str_to_time (not_on_or_after ))
92
92
if now > nooa + slack :
93
93
raise ResponseLifetimeExceed (
94
- "Can't use it, it's too old %d > %d" .format (nooa , now ))
94
+ "Can't use it, it's too old %d > %d" .format (now - slack , nooa ))
95
95
return nooa
96
96
else :
97
97
return False
@@ -102,8 +102,7 @@ def validate_before(not_before, slack):
102
102
now = time_util .utc_now ()
103
103
nbefore = calendar .timegm (time_util .str_to_time (not_before ))
104
104
if nbefore > now + slack :
105
- raise ToEarly ("Can't use it yet %d <= %d" % (nbefore ,
106
- now ))
105
+ raise ToEarly ("Can't use it yet %d <= %d" % (now + slack , nbefore ))
107
106
108
107
return True
109
108
You can’t perform that action at this time.
0 commit comments