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

Proposed by Jelmer Vernooij on 2015-11-15
Status: Merged
Approved by: Richard Wilbur on 2015-11-15
Approved revision: 6607
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 2015-11-15 Approve on 2015-11-15
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.
Jelmer Vernooij (jelmer) wrote :

Without this, it fails with a UnicodeDecodeError.

Richard Wilbur (richard-wilbur) wrote :

Thanks for the fix Jelmer.
+1

review: Approve
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Jelmer Vernooij (jelmer) wrote :

Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/doc_generate/autodoc_rstx.py'
2--- bzrlib/doc_generate/autodoc_rstx.py 2015-03-14 23:44:01 +0000
3+++ bzrlib/doc_generate/autodoc_rstx.py 2015-11-15 03:36:36 +0000
4@@ -131,7 +131,7 @@
5 topic_id = "%s-%s" % (topic, "help")
6 filename = bzrlib.osutils.pathjoin(output_dir, topic_id + ".txt")
7 f = open(filename, "w")
8- f.write(text)
9+ f.write(text.encode('utf-8'))
10 f.close()
11 return topic_id
12