Mike Bayer committed e364471

add environment substitution

Comments (0)

Files changed (1)

     dupl_opts = set(["v", "archive-dir", "name", "s3-use-new-style"])
     for k, v in config_dict.items():
         if _is_uppercase(k):
-            os.environ[k] = v
+            os.environ[k] = v % (os.environ)
         elif k in dupl_opts:
             if k == 'v':
                 cmd_options.append("-%s%s" % (k, v))
 # are passed to all sub-configs.
 # Any argument here including environment
 # variables can be per-sub-config.
+# Values can have spaces, don't add quotes as these
+# become part of the value.
 # environment variables - all UPPERCASE
-# names are sent to the env
+# names are sent to the env.
 AWS_ACCESS_KEY_ID=<your access key>
 AWS_SECRET_ACCESS_KEY=<your secret key>
 PASSPHRASE=this is my passphrase
+# env substitutions can also be used
+# with UPPERCASE variables.  Use two
+# percent signs, %%(varname)s
 # duplicity options