summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-07-18 16:10:17 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2014-07-22 15:55:26 +0100
commit63aa14fc7fd988b03f2206cc9ed7503afa7039a0 (patch)
treef8494efdbc90d6f48fac33860ee81ffccb34b7a0
parent14313b1c68a1c068ec841b4ac8aa074f0784267a (diff)
downloadmorph-63aa14fc7fd988b03f2206cc9ed7503afa7039a0.tar.gz
Tidy deploy_plugin a little
-rw-r--r--morphlib/plugins/deploy_plugin.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py
index 30e356e8..38c17bc2 100644
--- a/morphlib/plugins/deploy_plugin.py
+++ b/morphlib/plugins/deploy_plugin.py
@@ -308,7 +308,7 @@ class DeployPlugin(cliapp.Plugin):
all_deployments = set()
deployments = set()
for system in cluster_morphology['systems']:
- all_deployments.update([sys_id for sys_id in system['deploy']])
+ all_deployments.update(system['deploy'].iterkeys())
if 'subsystems' in system:
all_subsystems.update(loader._get_subsystem_names(system))
for item in args[1:]:
@@ -367,9 +367,9 @@ class DeployPlugin(cliapp.Plugin):
'Cannot directly deploy subsystems. Create a top '
'level deployment for the subsystem %s instead.' %
subsystem)
- if not any(deployment in var
- for deployment in all_deployments) \
- and not subsystem in var:
+ if (not any(deployment in var
+ for deployment in all_deployments)
+ and not subsystem in var):
raise cliapp.AppException(
'Variable referenced a non-existent deployment '
'name: %s' % var)
@@ -377,7 +377,7 @@ class DeployPlugin(cliapp.Plugin):
def deploy_system(self, build_command, deploy_tempdir,
root_repo_dir, build_repo, ref, system, env_vars,
deployment_filter, parent_location):
- sys_ids = set(sys_id for sys_id, _ in system['deploy'].iteritems())
+ sys_ids = set(system['deploy'].iterkeys())
if deployment_filter and not \
any(sys_id in deployment_filter for sys_id in sys_ids):
return