Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Avoid GCE checking if NO_GCE_CHECK is True #111

Merged
merged 6 commits into from
Jan 30, 2015

Conversation

erwanor
Copy link
Contributor

@erwanor erwanor commented Jan 9, 2015

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.

If NO_GCE_CHECK is True we avoid checking for a GCE environment  (_detect_gce_environment is not executed)
@craigcitro
Copy link
Contributor

@anthmgoogle can you take a look?

@anthmgoogle
Copy link

Looks good to me.

@erwanor
Copy link
Contributor Author

erwanor commented Jan 12, 2015

Great!
@craigcitro I have signed the contributor license agreement by the way.

@craigcitro
Copy link
Contributor

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?)

@erwanor
Copy link
Contributor Author

erwanor commented Jan 22, 2015

@craigcitro what do you think of ac61423 ?

Backward compatibility update (Google/oauth2client)
@erwanor
Copy link
Contributor Author

erwanor commented Jan 28, 2015

@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.

@craigcitro
Copy link
Contributor

one small nit, otherwise looks good.

Use '==' or '!=' instead of 'is' or 'is not'.
@erwanor
Copy link
Contributor Author

erwanor commented Jan 30, 2015

@craigcitro Done! 👍

@craigcitro
Copy link
Contributor

awesome -- thanks @aaronwinter!

craigcitro added a commit that referenced this pull request Jan 30, 2015
Avoid GCE checking if NO_GCE_CHECK is True
@craigcitro craigcitro merged commit 413bb81 into googleapis:master Jan 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants