From: Zac Medico Date: Mon, 10 Aug 2009 07:03:10 +0000 (-0000) Subject: Use writemsg_stdout() for safe unicode output of --list-sets. X-Git-Tag: v2.2_rc38~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cfe10ade8c97a6257f9d572d2c47d2838353a3ea;p=portage.git Use writemsg_stdout() for safe unicode output of --list-sets. svn path=/main/trunk/; revision=13973 --- diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 78ac776f5..909cb5eae 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -31,7 +31,7 @@ import portage.locks import portage.exception from portage.data import secpass from portage.util import normalize_path as normpath -from portage.util import writemsg, writemsg_level +from portage.util import writemsg, writemsg_level, writemsg_stdout from portage.sets import SETPREFIX from _emerge.actions import action_config, action_sync, action_metadata, \ @@ -1108,8 +1108,7 @@ def emerge_main(): root_config = trees[settings["ROOT"]]["root_config"] if myaction == "list-sets": - sys.stdout.write("".join("%s\n" % s for s in sorted(root_config.sets))) - sys.stdout.flush() + writemsg_stdout("".join("%s\n" % s for s in sorted(root_config.sets))) return os.EX_OK # only expand sets for actions taking package arguments