Add looser time check for macports
This commit is contained in:
parent
7e77546c3e
commit
9cecd76309
|
@ -36,6 +36,15 @@ class macports(Project):
|
||||||
csc_url = CSC_MIRROR + data[project]["csc"]
|
csc_url = CSC_MIRROR + data[project]["csc"]
|
||||||
upstream_url = data[project]["upstream"]
|
upstream_url = data[project]["upstream"]
|
||||||
file_name = data[project]["file"]
|
file_name = data[project]["file"]
|
||||||
|
|
||||||
|
upstreamDate = cls.checker(csc_url, file_name)
|
||||||
|
downstreamDate = cls.checker(upstream_url, file_name)
|
||||||
|
|
||||||
# Subtract 2 hours from upstream to account for timezones
|
if (upstreamDate < downstreamDate):
|
||||||
return cls.checker(csc_url, file_name) == cls.checker(upstream_url, file_name) - timedelta(hours=2)
|
timeDiff = downstreamDate - upstreamDate
|
||||||
|
else:
|
||||||
|
timeDiff = upstreamDate - downstreamDate
|
||||||
|
|
||||||
|
# MacPorts are updated so often that we want to make sure we are
|
||||||
|
# at most 6 hours out of date
|
||||||
|
return timeDiff < timedelta(hours=6)
|
||||||
|
|
Loading…
Reference in New Issue