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 issue 830 - Make fails with UnicodeDecodeError #915

Merged
merged 7 commits into from Mar 26, 2018

Conversation

@steffengraber
Copy link
Collaborator

@steffengraber steffengraber commented Mar 20, 2018

This pull request fix issue #830 by using the io.open() instead of the open() statement and adding encoding="utf8" to it.

Copy link
Contributor

@heplesser heplesser left a comment

@steffengraber This looks very fine already, just two places where I would prefer os.path.join().

Loading

@@ -134,12 +135,14 @@ def write_help_html(doc_dic, helpdir, fname, sli_command_list, keywords):
else:
path = os.path.join(helpdir, 'cc')

f_file_name = open('{}/{}.html'.format(path, name), 'w')
f_file_name = io.open('{}/{}.html'.format(path, name), mode='w',
encoding='utf-8')
Copy link
Contributor

@heplesser heplesser Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please build the file name as

os.path.join(path, '{}.html'.format(name))

Loading

"{}/{}.html".format(path, name)
f_file_name.write(cmdindexstring)
f_file_name.close()

f_file_name_hlp = open('{}/{}.hlp'.format(path, name), 'w')
f_file_name_hlp = io.open('{}/{}.hlp'.format(path, name), mode='w',
encoding='utf-8')
Copy link
Contributor

@heplesser heplesser Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please build the file name as

os.path.join(path, '{}.html'.format(name))

Loading

Copy link
Contributor

@hakonsbm hakonsbm left a comment

Looks good to me.

Loading

@heplesser heplesser merged commit a3729fd into nest:master Mar 26, 2018
1 check passed
Loading
@steffengraber steffengraber deleted the fix-issue-830 branch Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants