Allow unicode type values in config.__setitem__(). Thanks to Arfrever Frehtes
authorZac Medico <zmedico@gentoo.org>
Sat, 7 Mar 2009 19:10:20 +0000 (19:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 7 Mar 2009 19:10:20 +0000 (19:10 -0000)
Taifersar Arahesis for this patch.

svn path=/main/trunk/; revision=12774

pym/portage/__init__.py

index 83acb0fedd37c750ac1c15e70aa14960703b19ec..a8d55ca6be8f3d31d87b6aa5d4242cfc3433baa3 100644 (file)
@@ -2972,7 +2972,7 @@ class config(object):
 
        def __setitem__(self,mykey,myvalue):
                "set a value; will be thrown away at reset() time"
-               if not isinstance(myvalue, str):
+               if not isinstance(myvalue, basestring):
                        raise ValueError("Invalid type being used as a value: '%s': '%s'" % (str(mykey),str(myvalue)))
                self.modifying()
                self.modifiedkeys += [mykey]