From: Zac Medico Date: Fri, 14 Oct 2011 19:31:19 +0000 (-0700) Subject: repoman: handle unicode in echangelog args X-Git-Tag: v2.2.0_alpha68~46 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=366e9f0dc05b063427235b567c5e0874db41cf6b;p=portage.git repoman: handle unicode in echangelog args --- diff --git a/bin/repoman b/bin/repoman index 47ae974d8..11fb56a56 100755 --- a/bin/repoman +++ b/bin/repoman @@ -73,7 +73,7 @@ from portage.process import find_binary, spawn from portage.output import bold, create_color_func, \ green, nocolor, red from portage.output import ConsoleStyleFile, StyleWriter -from portage.util import cmp_sort_key, writemsg_level +from portage.util import cmp_sort_key, writemsg_level, writemsg_stdout from portage.package.ebuild.digestgen import digestgen from portage.eapi import eapi_has_slot_deps, \ eapi_has_use_deps, eapi_has_strong_blocks, eapi_has_iuse_defaults, \ @@ -2444,9 +2444,13 @@ else: logging.info("calling echangelog for package %s" % x) echangelog_args = ["echangelog", "--vcs", vcs, changelog_msg] if options.pretend: - print("(%s)" % (" ".join(echangelog_args),)) + writemsg_stdout("(%s)\n" % (" ".join(echangelog_args),), + noiselevel=-1) continue - retcode = subprocess.call(echangelog_args, cwd=checkdir) + echangelog_args = [_unicode_encode(arg) for arg in echangelog_args] + echangelog_cwd = _unicode_encode(checkdir, + encoding=_encodings['fs'], errors='strict') + retcode = subprocess.call(echangelog_args, cwd=echangelog_cwd) if retcode != os.EX_OK: logging.error("echangelog exited with '%s' status" % retcode) sys.exit(retcode)