summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-10 07:03:10 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-10 07:03:10 +0000
commitcfe10ade8c97a6257f9d572d2c47d2838353a3ea (patch)
tree42ef5a57aeb84e3a1d0b98e56d4d6eb41fbed40b
parent42c2ec9577bb45979a4ed2408e4488fcc1ada763 (diff)
downloadportage-cfe10ade8c97a6257f9d572d2c47d2838353a3ea.tar.gz
portage-cfe10ade8c97a6257f9d572d2c47d2838353a3ea.tar.bz2
portage-cfe10ade8c97a6257f9d572d2c47d2838353a3ea.zip
Use writemsg_stdout() for safe unicode output of --list-sets.
svn path=/main/trunk/; revision=13973
-rw-r--r--pym/_emerge/main.py5
1 files changed, 2 insertions, 3 deletions
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