Don't default env=os.environ directly in the config constructor because
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 07:48:13 +0000 (07:48 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 07:48:13 +0000 (07:48 -0000)
that makes it show environment variables in api docs generated by epydoc.
(trunk r12824)

svn path=/main/branches/2.1.6/; revision=13055

pym/portage/__init__.py

index dc007cb2472c07eb9d3be9f8783d85a09a873eb5..80ab03a95715679e4d5f6f6a4e9d3623eb637852 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: