Skip to content

Commit 0b0a9de

Browse files
author
Clark Perkins
committed
Fixed bug with creating blueprints from mappings
1 parent e4dfcce commit 0b0a9de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stackdio/cli/mixins/blueprints.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ def create_blueprint(client, mapping, template, var_file, no_prompt):
133133
raise click.UsageError('Missing \'blueprint_dir\' in config. Please run `configure`.')
134134

135135
if mapping:
136-
mapping = yaml.safe_load(open(os.path.join(blueprint_dir, 'mappings.yaml'), 'r'))
137-
if not mapping or mapping not in mapping:
136+
mappings = yaml.safe_load(open(os.path.join(blueprint_dir, 'mappings.yaml'), 'r'))
137+
if not mappings or mapping not in mappings:
138138
click.secho('You gave an invalid mapping.', fg='red')
139139
return
140140
else:
141-
template = mapping[mapping].get('template')
142-
var_file = mapping[mapping].get('var_files', [])
141+
template = mappings[mapping].get('template')
142+
var_file = mappings[mapping].get('var_files', [])
143143
if not template:
144144
click.secho('Your mapping must specify a template.', fg='red')
145145
return

0 commit comments

Comments
 (0)