From ecaa391a9a3bcfa338b9f29d9da6ec6bea4ed5d8 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 6 Dec 2010 13:50:52 +0100 Subject: Use bytes literals. --- pym/repoman/utilities.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pym/repoman') diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index 953c3cd2b..9d4898e8a 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -30,6 +30,7 @@ from portage import _encodings from portage import _unicode_decode from portage import _unicode_encode from portage import output +from portage.localization import _ from portage.output import red, green from portage.process import find_binary from portage import exception @@ -310,14 +311,13 @@ def get_commit_message_with_editor(editor, message=None): from tempfile import mkstemp fd, filename = mkstemp() try: - os.write(fd, _unicode_encode( + os.write(fd, _unicode_encode(_( "\n# Please enter the commit message " + \ "for your changes.\n# (Comment lines starting " + \ - "with '#' will not be included)\n", + "with '#' will not be included)\n"), encoding=_encodings['content'], errors='backslashreplace')) if message: - os.write(fd, _unicode_encode("#\n", - encoding=_encodings['content'], errors='backslashreplace')) + os.write(fd, b"#\n") for line in message: os.write(fd, _unicode_encode("#" + line, encoding=_encodings['content'], errors='backslashreplace')) -- cgit v1.2.3-1-g7c22