summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-04 19:27:24 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-04 19:27:24 +0000
commit5013be0b2b4d6cdf530d1f324ad8e74b112b2544 (patch)
treecedad3f47309631064d53baba0b12d77899bf26a
parentdb484dfe75fa0169a6a7e42d35827a63ee2fdd20 (diff)
downloadportage-5013be0b2b4d6cdf530d1f324ad8e74b112b2544.tar.gz
portage-5013be0b2b4d6cdf530d1f324ad8e74b112b2544.tar.bz2
portage-5013be0b2b4d6cdf530d1f324ad8e74b112b2544.zip
Bug #280269 - Decode commandline arguments to unicode when necessary.
svn path=/main/trunk/; revision=13904
-rw-r--r--pym/_emerge/main.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 34b6ef1c5..0d14107cb 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -747,6 +747,10 @@ def parse_opts(tmpcmdline, silent=False):
if myaction is None and myoptions.deselect is True:
myaction = 'deselect'
+ if myargs and not isinstance(myargs[0], unicode):
+ for i in xrange(len(myargs)):
+ myargs[i] = unicode(myargs[i], encoding='utf_8', errors='replace')
+
myfiles += myargs
return myaction, myopts, myfiles