[Pkg-mozext-commits] [mozilla-devscripts] 01/02: amo-changelog: output utf-8 by default instead of ascii, which errors when the input contains non-ascii chars
Benjamin Drung
bdrung at moszumanska.debian.org
Sat May 17 17:42:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
bdrung pushed a commit to branch master
in repository mozilla-devscripts.
commit 2df58091822b2df6d31303e05b750468785bb1fa
Author: Ximin Luo <infinity0 at pwned.gg>
Date: Sat May 17 16:26:01 2014 +0100
amo-changelog: output utf-8 by default instead of ascii, which errors when the input contains non-ascii chars
---
amo-changelog | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/amo-changelog b/amo-changelog
index ad4a823..4ce9e73 100755
--- a/amo-changelog
+++ b/amo-changelog
@@ -45,12 +45,12 @@ def main():
for _, element in etree.iterparse(fp):
if element.tag != "item":
continue
- title = element.find("title").text
+ title = element.find("title").text.encode("utf-8")
print(title)
print("=" * len(title))
descel = element.find("description")
if descel is not None and descel.text:
- print(descel.text.rstrip("\n"))
+ print(descel.text.rstrip("\n").encode("utf-8"))
else:
print("[no description]")
print("")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/mozilla-devscripts.git
More information about the Pkg-mozext-commits
mailing list