summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-15 19:35:54 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-15 19:35:54 -0700
commit91d294b7b78fa809dd4e56f51bfb53f4479fe578 (patch)
tree6799d8b958bd4f376b9f46a455fa6bddb373e192
parentf15c724e6ea494c21e57289b0361614b6656ac35 (diff)
downloadportage-91d294b7b78fa809dd4e56f51bfb53f4479fe578.tar.gz
portage-91d294b7b78fa809dd4e56f51bfb53f4479fe578.tar.bz2
portage-91d294b7b78fa809dd4e56f51bfb53f4479fe578.zip
Fix make.conf code to handle None return value from getconfig().
-rw-r--r--pym/portage/package/ebuild/config.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 27cd85470..23280d6f3 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -624,12 +624,12 @@ class config(object):
make_conf = getconfig(
os.path.join(config_root, MAKE_CONF_FILE),
- tolerant=tolerant, allow_sourcing=True)
+ tolerant=tolerant, allow_sourcing=True) or {}
make_conf.update(getconfig(
os.path.join(abs_user_config, 'make.conf'),
tolerant=tolerant, allow_sourcing=True,
- expand=make_conf))
+ expand=make_conf) or {})
# Allow ROOT setting to come from make.conf if it's not overridden
# by the constructor argument (from the calling environment).
@@ -731,11 +731,13 @@ class config(object):
self.mygcfg = getconfig(
os.path.join(config_root, MAKE_CONF_FILE),
- tolerant=tolerant, allow_sourcing=True, expand=expand_map)
+ tolerant=tolerant, allow_sourcing=True,
+ expand=expand_map) or {}
self.mygcfg.update(getconfig(
os.path.join(abs_user_config, 'make.conf'),
- tolerant=tolerant, allow_sourcing=True, expand=expand_map))
+ tolerant=tolerant, allow_sourcing=True,
+ expand=expand_map) or {})
# Don't allow the user to override certain variables in make.conf
profile_only_variables = self.configdict["defaults"].get(