From 1beb81681fa549d76b9f3d06dd9d99033e4aaaae Mon Sep 17 00:00:00 2001 From: nodiscc Date: Wed, 20 Dec 2023 16:20:14 +0100 Subject: [PATCH] fix pylint warning W1514: Using open without explicitly specifying an encoding --- hecat/exporters/markdown_singlepage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hecat/exporters/markdown_singlepage.py b/hecat/exporters/markdown_singlepage.py index ec7798e..6f58542 100644 --- a/hecat/exporters/markdown_singlepage.py +++ b/hecat/exporters/markdown_singlepage.py @@ -308,9 +308,9 @@ def render_markdown_singlepage(step): markdown_header = '' markdown_footer = '' if 'markdown_header' in step['module_options']: - markdown_header = open(step['module_options']['source_directory'] + '/' + step['module_options']['markdown_header'], 'r').read() + markdown_header = open(step['module_options']['source_directory'] + '/' + step['module_options']['markdown_header'], 'r', encoding="utf-8").read() if 'markdown_footer' in step['module_options']: - markdown_footer = open(step['module_options']['source_directory'] + '/' + step['module_options']['markdown_footer'], 'r').read() + markdown_footer = open(step['module_options']['source_directory'] + '/' + step['module_options']['markdown_footer'], 'r', encoding="utf-8").read() markdown_software_list = '## Software\n\n' if ('exclude_licenses' in step['module_options']) and ('include_licenses' in step['module_options']): logging.error('module options exclude_licenses and include_licenses cannot be used together.')