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

Projects
None yet
3 participants
@steffengraber
Copy link
Contributor

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.

@heplesser
Copy link
Contributor

heplesser left a comment

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

@@ -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')

This comment has been minimized.

@heplesser

heplesser Mar 20, 2018

Contributor

Please build the file name as

os.path.join(path, '{}.html'.format(name))
"{}/{}.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')

This comment has been minimized.

@heplesser

heplesser Mar 20, 2018

Contributor

Please build the file name as

os.path.join(path, '{}.html'.format(name))
@hakonsbm
Copy link
Contributor

hakonsbm left a comment

Looks good to me.

@heplesser heplesser merged commit a3729fd into nest:master Mar 26, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@steffengraber steffengraber deleted the steffengraber: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
You can’t perform that action at this time.