Merge lp:~jelmer/bzr/autodoc-unicode into lp:bzr

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Richard Wilbur
Approved revision: no longer in the source branch.
Merged at revision: 6609
Proposed branch: lp:~jelmer/bzr/autodoc-unicode
Merge into: lp:bzr
Diff against target: 11 lines (+1/-1)
1 file modified
bzrlib/doc_generate/autodoc_rstx.py (+1/-1)
To merge this branch: bzr merge lp:~jelmer/bzr/autodoc-unicode
Reviewer Review Type Date Requested Status
Richard Wilbur Approve
Review via email: mp+277510@code.launchpad.net

Commit message

Fix autodoc runner when LANG=C.

Description of the change

Fix autodoc runner when LANG=C.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Without this, it fails with a UnicodeDecodeError.

Revision history for this message
Richard Wilbur (richard-wilbur) wrote :

Thanks for the fix Jelmer.
+1

review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/doc_generate/autodoc_rstx.py'
--- bzrlib/doc_generate/autodoc_rstx.py 2015-03-14 23:44:01 +0000
+++ bzrlib/doc_generate/autodoc_rstx.py 2015-11-15 03:36:36 +0000
@@ -131,7 +131,7 @@
131 topic_id = "%s-%s" % (topic, "help")131 topic_id = "%s-%s" % (topic, "help")
132 filename = bzrlib.osutils.pathjoin(output_dir, topic_id + ".txt")132 filename = bzrlib.osutils.pathjoin(output_dir, topic_id + ".txt")
133 f = open(filename, "w")133 f = open(filename, "w")
134 f.write(text)134 f.write(text.encode('utf-8'))
135 f.close()135 f.close()
136 return topic_id136 return topic_id
137137