From 2390c4284e4f41a3cc47d052d19f555b8d422a38 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Sat, 2 Jan 2016 07:44:48 -0800 Subject: [PATCH] Clearing cache_dir has to come after directory check --- src/gam.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gam.py b/src/gam.py index c2aa6727..729fa022 100755 --- a/src/gam.py +++ b/src/gam.py @@ -239,7 +239,6 @@ GC_VAR_INFO = { GC_USER_MAX_RESULTS: {GC_VAR_TYPE_KEY: GC_TYPE_INTEGER, GC_VAR_ENVVAR_KEY: u'GAM_USER_MAX_RESULTS', GC_VAR_LIMITS_KEY: (1, 500)}, } - MESSAGE_BATCH_CSV_DASH_DEBUG_INCOMPATIBLE = u'"gam {0} - ..." is not compatible with debugging. Disable debugging by deleting debug.gam and try again.' MESSAGE_CLIENT_API_ACCESS_DENIED = u'Access Denied. Please make sure the Client Name:\n\n{0}\n\nis authorized for the API Scope(s):\n\n{1}\n\nThis can be configured in your Control Panel under:\n\nSecurity -->\nAdvanced Settings -->\nManage API client access' MESSAGE_GAMSCOPES_JSON_INVALID = u'The file {0} is missing the required key (scopes) or has an invalid format.' @@ -518,13 +517,13 @@ def SetGlobalVariables(): GM_Globals[GM_OAUTH2SERVICE_KEY] = None GM_Globals[GM_OAUTH2SERVICE_ACCOUNT_EMAIL] = None GM_Globals[GM_OAUTH2SERVICE_ACCOUNT_CLIENT_ID] = None - if GC_Values[GC_NO_CACHE]: - GC_Values[GC_CACHE_DIR] = None json_string = readFile(GC_Values[GC_GAMSCOPES_JSON], continueOnError=True, displayError=False) if json_string and not validateSetGAMScopes(json.loads(json_string)): systemErrorExit(19, MESSAGE_GAMSCOPES_JSON_INVALID.format(GC_Values[GC_GAMSCOPES_JSON])) _chkCfgDirectories() _chkCfgFiles() + if GC_Values[GC_NO_CACHE]: + GC_Values[GC_CACHE_DIR] = None return True def doGAMCheckForUpdates(forceCheck=False):