Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #809 from ueqt/fix-jinja2-unicodedecodeerror
Browse files Browse the repository at this point in the history
fix jinja2 unicodedecodeerror
  • Loading branch information
hwuu authored Jul 18, 2018
2 parents 31cc18e + 4547809 commit dfbf6ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pai-management/k8sPaiLibrary/maintainlib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def execute_shell_return(shell_cmd, error_msg):
def read_template(template_path):

with open(template_path, "r") as fin:
template_data = fin.read()
template_data = fin.read().decode('utf-8')

return template_data

Expand Down
2 changes: 1 addition & 1 deletion pai-management/paiLibrary/common/file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def load_yaml_config(config_path):
def read_template(template_path):

with open(template_path, "r") as f:
template_data = f.read()
template_data = f.read().decode('utf-8')

return template_data

Expand Down
2 changes: 1 addition & 1 deletion pai-management/paiLibrary/imageTool/host-configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def load_yaml_config(config_path):
def read_template(template_path):

with open(template_path, "r") as f:
template_data = f.read()
template_data = f.read().decode('utf-8')

return template_data

Expand Down

0 comments on commit dfbf6ce

Please sign in to comment.