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

Fix base64 encoding #302

Merged
merged 3 commits into from
Jan 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Release History
===============

0.10.9
+++++++++++++++

**Azure IoT Product Certification service**

* Fix bug for `az iot product test create` sending a byte string instead of "regular" base64 string.

0.10.8
+++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion azext_iot/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import os

VERSION = "0.10.8"
VERSION = "0.10.9"
EXTENSION_NAME = "azure-iot"
EXTENSION_ROOT = os.path.dirname(os.path.abspath(__file__))
EXTENSION_CONFIG_ROOT_KEY = "iotext"
Expand Down
5 changes: 2 additions & 3 deletions azext_iot/product/test/command_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,8 @@ def _read_certificate_from_file(certificate_path):
with open(file=certificate_path, mode="rb") as f:
data = f.read()

from base64 import encodestring # pylint: disable=no-name-in-module

return encodestring(data)
from base64 import b64encode # pylint: disable=no-name-in-module
return b64encode(data).decode('utf-8')


def _create_from_file(configuration_file):
Expand Down