Don't default env=os.environ directly in the config constructor because v2.2_rc24
authorZac Medico <zmedico@gentoo.org>
Tue, 10 Mar 2009 08:15:57 +0000 (08:15 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 10 Mar 2009 08:15:57 +0000 (08:15 -0000)
that makes it show environment variables in api docs generated by epydoc.

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

pym/portage/__init__.py

index 24997e2801adb7a47fa705ab44b4a76cb560e5a4..1dc81cf597427c9cf6806a622063a0dff6bdc22f 100644 (file)
@@ -1117,7 +1117,7 @@ class config(object):
 
        def __init__(self, clone=None, mycpv=None, config_profile_path=None,
                config_incrementals=None, config_root=None, target_root=None,
-               local_config=True, env=os.environ):
+               local_config=True, env=None):
                """
                @param clone: If provided, init will use deepcopy to copy by value the instance.
                @type clone: Instance of config class.
@@ -1455,6 +1455,8 @@ class config(object):
                                expand_map.update(env_d)
 
                        # backupenv is used for calculating incremental variables.
+                       if env is None:
+                               env = os.environ
                        self.backupenv = env.copy()
 
                        if env_d: