Bug #224713 - Avoid TypeError when make.conf is missing:
authorZac Medico <zmedico@gentoo.org>
Wed, 4 Jun 2008 23:44:50 +0000 (23:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 4 Jun 2008 23:44:50 +0000 (23:44 -0000)
TypeError: argument of type 'NoneType' is not iterable

svn path=/main/trunk/; revision=10582

pym/portage/__init__.py

index 051d6dd4aee003b1fca860711ff979eea671ce82..9c9fbc0995162e1a0a94a385868ca3831c206aeb 100644 (file)
@@ -1272,6 +1272,8 @@ class config(object):
                        make_conf = getconfig(
                                os.path.join(config_root, MAKE_CONF_FILE.lstrip(os.path.sep)),
                                tolerant=tolerant, allow_sourcing=True)
+                       if make_conf is None:
+                               make_conf = {}
 
                        # Allow ROOT setting to come from make.conf if it's not overridden
                        # by the constructor argument (from the calling environment).