10000 Fixes b64 types for encoding / JSON decoding by gguuss · Pull Request #1259 · GoogleCloudPlatform/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content

Fixes b64 types for encoding / JSON decoding #1259

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

Merged
merged 1 commit into from
Dec 8, 2017
Merged

Conversation

gguuss
Copy link
Contributor
@gguuss gguuss commented Dec 8, 2017

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 8, 2017
@@ -110,7 +110,8 @@ def _update_device_config(self, project_id, region, registry_id, device_id,
# The data is passed as raw bytes, so you encode it as base64.
# Note that the device will receive the decoded string, so you
# do not need to base64 decode the string on the device.
'binary_data': base64.b64encode(config_data_json)
'binary_data': base64.b64encode(
config_data_json.encode('utf-8')).decode('ascii')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean really?

@theacodes theacodes merged commit 92ffb56 into master Dec 8, 2017
@theacodes theacodes deleted the iot-fix-endtoend branch December 8, 2017 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0