Commit 2f6a0d87 authored by maruel@chromium.org's avatar maruel@chromium.org

gcl's caching was effectively disabled for > 1 year. Reenable it.

TEST=chmod a-w .svn/gcl_info/cache/codereview.settings and see if an exception is thrown when the file is recent

Review URL: http://codereview.chromium.org/2057006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46990 0039d316-1c4b-4281-b951-d872f2087c98
parent 982984e1
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment