Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2175)

Unified Diff: gcl.py

Issue 2057006: gcl's caching was effectively disabled for > 1 year. Reenable it. (Closed)
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcl.py
diff --git a/gcl.py b/gcl.py
index 7237aac27bf2cdabfdeaecb8072d0124e8892325..d356da532c11a2d39e16d2ecca25cd29fb7b6a64 100755
--- a/gcl.py
+++ b/gcl.py
@@ -15,6 +15,7 @@ import string
import subprocess
import sys
import tempfile
+import time
from third_party import upload
import urllib2
@@ -131,7 +132,7 @@ def GetCachedFile(filename, max_age=60*60*24*3, use_root=False):
except gclient_utils.Error:
return None
if (not os.path.exists(cached_file) or
- os.stat(cached_file).st_mtime > max_age):
+ (time.time() - os.stat(cached_file).st_mtime) > max_age):
dir_info = SVN.CaptureInfo(".")
repo_root = dir_info["Repository Root"]
if use_root:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698