From: Zac Medico Date: Sun, 29 Oct 2006 22:25:50 +0000 (-0000) Subject: For bug #153295, do a sanity check for non-string types in config.environ(). X-Git-Tag: v2.1.2~530 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d692c56e2bb94ccbfae16c42212a4fe10b3223be;p=portage.git For bug #153295, do a sanity check for non-string types in config.environ(). svn path=/main/trunk/; revision=4877 --- diff --git a/pym/portage.py b/pym/portage.py index 70671b593..f527ad826 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1910,7 +1910,12 @@ class config: "return our locally-maintained environment" mydict={} for x in self.keys(): - mydict[x]=self[x] + myvalue = self[x] + if not isinstance(myvalue, basestring): + writemsg("!!! Non-string value in config: %s=%s\n" % \ + (x, myvalue), noiselevel=-1) + continue + mydict[x] = myvalue if not mydict.has_key("HOME") and mydict.has_key("BUILD_PREFIX"): writemsg("*** HOME not set. Setting to "+mydict["BUILD_PREFIX"]+"\n") mydict["HOME"]=mydict["BUILD_PREFIX"][:]