diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-07-22 15:55:44 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-07-22 15:55:44 +0100 |
commit | 901ffbe0cb7554150b40f5ee40648b338df36eba (patch) | |
tree | 43ef4512d031383af62433df2578395693fb515b /morphlib/plugins/deploy_plugin.py | |
parent | 4be1620dca24d539573027831b65ffc040bc1ebb (diff) | |
parent | fc5bb595b123db557d2b10a8d570d25e14119686 (diff) | |
download | morph-901ffbe0cb7554150b40f5ee40648b338df36eba.tar.gz |
Merge branch 'baserock/richardmaw-os/chunks-in-defs-v3'
Reviewed-by: Daniel Silverstone
Reviewed-by: Sam Thursfield
Diffstat (limited to 'morphlib/plugins/deploy_plugin.py')
-rw-r--r-- | morphlib/plugins/deploy_plugin.py | 10 |
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 |