Allow unicode type values in config.__setitem__(). Thanks to Arfrever Frehtes
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:46:26 +0000 (06:46 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:46:26 +0000 (06:46 -0000)
Taifersar Arahesis for this patch. (trunk r12774)

svn path=/main/branches/2.1.6/; revision=13018

pym/portage/__init__.py

index 7a3a9f2709e633e8f3f8c92e31fad61987ace7ae..b59c16f20d6d2c32de491373f90d7a6d8939ca79 100644 (file)
@@ -2962,7 +2962,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]