diff options
author | 2021-10-15 15:07:41 +0100 | |
---|---|---|
committer | 2021-10-18 12:13:06 +0000 | |
commit | 005d5dee8be436246276195067c67ce68d68c2d7 (patch) | |
tree | cee8448bd71fa24a17f724de46ea84ea6e7840cc /catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py | |
parent | 1b61e72f6506de7c1f64098dd25adf7af7b31dc1 (diff) |
Force encoding while reading files in init scripts
To avoid system dependency by using the default encoding,
this change sets the encoding when opening files in python
scripts to "UTF-8".
Change-Id: Ib35f4300f10dea309fcc2967448bd80cad0b335f
Issue-ID: SDC-3761
Signed-off-by: André Schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py')
-rw-r--r-- | catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py index 8506207ff9..ef23e3ff6d 100644 --- a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py +++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py @@ -94,7 +94,7 @@ def _create_zip_file_multi_part(element_form_name, type_file_name, element_name) def _create_json_metadata_str(file_name): type_metadata_json_file = file_name + ".json" debug(type_metadata_json_file) - json_file = open(type_metadata_json_file) + json_file = open(type_metadata_json_file, encoding='utf-8') debug("before load json") json_data = json.load(json_file, strict=False) |