This repository has been archived by the owner on Nov 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 429
Avoid GCE checking if NO_GCE_CHECK is True #111
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If NO_GCE_CHECK is True we avoid checking for a GCE environment (_detect_gce_environment is not executed)
@anthmgoogle can you take a look? |
Looks good to me. |
Great! |
sweet! @aaronwinter you answered my question before i even asked it. i'm thinking we should maybe switch from a global to an env var? (or have the global default to the env var?) |
Pull recent auth2client release (crypt + timeout)
Following @craigcitro's suggestion
@craigcitro what do you think of ac61423 ? |
Backward compatibility update (Google/oauth2client)
@craigcitro I have pulled the recent updates made to insure backward compatibility. I believe that it is ready to be merged if you are OK with that? |
@@ -970,7 +974,7 @@ def _get_environment(urlopen=None): | |||
SETTINGS.env_name = 'GAE_PRODUCTION' | |||
elif server_software.startswith('Development/'): | |||
SETTINGS.env_name = 'GAE_LOCAL' | |||
elif _detect_gce_environment(urlopen=urlopen): | |||
elif NO_GCE_CHECK is not 'True' and _detect_gce_environment(urlopen=urlopen): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
one small nit, otherwise looks good. |
Use '==' or '!=' instead of 'is' or 'is not'.
@craigcitro Done! 👍 |
awesome -- thanks @aaronwinter! |
craigcitro
added a commit
that referenced
this pull request
Jan 30, 2015
Avoid GCE checking if NO_GCE_CHECK is True
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following issue #93 there is now a variable NO_GCE _CHECK set by default to False that will skip any GCE check if set to True.