Author: sebb
Date: Sat Oct 17 22:22:41 2015
New Revision: 1709221
URL: http://svn.apache.org/viewvc?rev=1709221&view=rev
Log:
0 is valid as an mtime
Modified:
comdev/projects.apache.org/scripts/committee_info.py
Modified: comdev/projects.apache.org/scripts/committee_info.py
URL:
http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/committee_info.py?rev=1709221&r1=1709220&r2=1709221&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/committee_info.py (original)
+++ comdev/projects.apache.org/scripts/committee_info.py Sat Oct 17 22:22:41
2015
@@ -42,7 +42,7 @@ def file_mtime(filename):
try:
t = os.path.getmtime(filename)
except FileNotFoundError:
- t = 0
+ t = -1 # distinguish from no modTime in http response
return t
# download url as file if the cached copy is too old
@@ -50,7 +50,7 @@ def get_url_if_newer(url, dir, name):
path=join(dir,name)
fileTime = file_mtime(path)
check = join(dir,".checked_"+name)
- if fileTime > 0:
+ if fileTime >= 0:
checkTime = file_mtime(check)
now = time.time()
if checkTime > (now - INTERVAL):
@@ -59,7 +59,7 @@ def get_url_if_newer(url, dir, name):
else:
print("Not recently checked\n%d\n%d" % (checkTime, now))
else:
- print("Not found")
+ print("Not found %s" % name)
sinceTime = mod_date(fileTime)
headers = {"If-Modified-Since" : sinceTime}