summaryrefslogtreecommitdiffstats
path: root/pym/portage/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/util.py')
-rw-r--r--pym/portage/util.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage/util.py b/pym/portage/util.py
index 87332f42e..c358341a2 100644
--- a/pym/portage/util.py
+++ b/pym/portage/util.py
@@ -320,7 +320,13 @@ class _tolerant_shlex(shlex.shlex):
return (newfile, StringIO.StringIO())
def getconfig(mycfg, tolerant=0, allow_sourcing=False, expand=True):
- mykeys={}
+ if isinstance(expand, dict):
+ # Some existing variable definitions have been
+ # passed in, for use in substitutions.
+ mykeys = expand.copy()
+ expand = True
+ else:
+ mykeys = {}
try:
f=open(mycfg,'r')
except IOError, e: