summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage_util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py
index 83cdeda50..9d1bb84c2 100644
--- a/pym/portage_util.py
+++ b/pym/portage_util.py
@@ -286,10 +286,10 @@ def getconfig(mycfg,tolerant=0,allow_sourcing=False):
#cache expansions of constant strings
cexpand={}
def varexpand(mystring,mydict={}):
- try:
- return cexpand[" "+mystring]
- except KeyError:
- pass
+ newstring = cexpand.get(" "+mystring, None)
+ if newstring is not None:
+ return newstring
+
"""
new variable expansion code. Removes quotes, handles \n, etc.
This code is used by the configfile code, as well as others (parser)