Skip to content

Commit eb35ad2

Browse files
authored
--input-path should accept other encoding types besides UTF-8 encoding (#5181)
1 parent cf1ee43 commit eb35ad2

File tree

6 files changed

+110
-67
lines changed

6 files changed

+110
-67
lines changed

src/portal/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
0.1.3
7+
++++++
8+
* [Fix] `az portal dashboard`: `--input-path` should accept other encoding types besides UTF-8 encoding.
9+
610
0.1.1
711
++++++
812
* Initial release.

src/portal/azext_portal/generated/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def portal_dashboard_import(cmd, client,
5656

5757
def parse_properties_json(input_path):
5858
try:
59-
with open(input_path) as json_file:
59+
with open(input_path, 'rb') as json_file:
6060
try:
6161
properties = json.load(json_file)
6262
except json.decoder.JSONDecodeError as ex:

src/portal/azext_portal/tests/latest/properties-update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"lenses": {
33
"0": {
44
"order": 0,

0 commit comments

Comments
 (0)