Bug #280269 - Decode commandline arguments to unicode when necessary.
authorZac Medico <zmedico@gentoo.org>
Tue, 4 Aug 2009 19:27:24 +0000 (19:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 4 Aug 2009 19:27:24 +0000 (19:27 -0000)
svn path=/main/trunk/; revision=13904

pym/_emerge/main.py

index 34b6ef1c5715f56ca7564ae7ab642c23483c6197..0d14107cb366b9190108319be24a1581b33174a6 100644 (file)
@@ -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