diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-13 09:53:32 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-08-13 14:21:52 +0000 |
commit | ec6d4e10304293157ba61501b7f053cb1cbc142a (patch) | |
tree | 144869b0f95956aac6756ad3016221580f835028 /morphlib/plugins/deploy_plugin.py | |
parent | c38b5ddeb6359f6f848553bcfdde52365c807ab4 (diff) | |
download | morph-ec6d4e10304293157ba61501b7f053cb1cbc142a.tar.gz |
deploy: refactor environment argument parsing
It is now a tested helper function in morphlib.util
Diffstat (limited to 'morphlib/plugins/deploy_plugin.py')
-rw-r--r-- | morphlib/plugins/deploy_plugin.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index ef607ffe..edc4a81a 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -303,13 +303,7 @@ class DeployPlugin(cliapp.Plugin): system_tree=system_tree) # Set up environment for running extensions. - env = dict(os.environ) - for spec in env_vars: - name, value = spec.split('=', 1) - if name in env: - raise morphlib.Error( - '%s is already set in the enviroment' % name) - env[name] = value + env = morphlib.util.parse_environment_pairs(os.environ, env_vars) # Extensions get a private tempdir so we can more easily clean # up any files an extension left behind |