From 87dad41087c773f2c985350a950542d39b1f683d Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 18 Oct 2012 20:07:29 +0000 Subject: [PATCH] Fix a specific use case for the CQ. Ensure the gcl change directory is created when gcl was never used by itself but used through trychange.py R=nsylvain@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/11193040 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@162769 0039d316-1c4b-4281-b951-d872f2087c98 --- gcl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcl.py b/gcl.py index 01a93e11c7..fcfd114646 100755 --- a/gcl.py +++ b/gcl.py @@ -123,6 +123,9 @@ def GetCachedFile(filename, max_age=60*60*24*3, use_root=False): Note: The cache will be inconsistent if the same file is retrieved with both use_root=True and use_root=False. Don't be stupid. """ + if not os.path.isdir(GetCacheDir()): + os.makedirs(GetCacheDir()) + if filename not in FILES_CACHE: # Don't try to look up twice. FILES_CACHE[filename] = None