Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return None if project key is missing. #2537

Merged

Conversation

daspecster
Copy link
Contributor

If SDK configuration is missing the project key, then _default_service_project() should return None instead of throwing KeyError.

Fixes #2536

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 12, 2016
@daspecster daspecster merged commit d31f466 into googleapis:master Oct 12, 2016
@daspecster daspecster deleted the handle-broken-config-properly branch October 12, 2016 21:03
@dhermes
Copy link
Contributor

dhermes commented Oct 13, 2016

@daspecster This is similar to what happened in #2292

@daspecster
Copy link
Contributor Author

Yeah it looks similar.
I think in this case, the default SDK credentials had the [core] section but was missing the project_id.

Then, apparently the from_service_account_json doesn't handle the project detection correctly?

richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
…ig-properly

Return None if project key is missing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants