Skip to content
Browse files

Merge pull request #152 from duego/fix_grains_opt

Invalid assumption of existing grains key
  • Loading branch information...
2 parents df07801 + c8d7a18 commit 3951a53d8c4466413654eeb6fe609a74e2e60fb8 @techhat techhat committed Nov 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 saltcloud/utils/__init__.py
View
4 saltcloud/utils/__init__.py
@@ -145,10 +145,10 @@ def minion_conf_string(opts, vm_):
minion.update(vm_.get('map_minion', {}))
optsgrains = opts.get('map_grains', {})
if optsgrains:
- minion['grains'].update(optsgrains)
+ minion.setdefault('grains', {}).update(optsgrains)
vmgrains = vm_.get('map_grains', {})
if vmgrains:
- minion['grains'].update(vmgrains)
+ minion.setdefault('grains', {}).update(vmgrains)
return yaml.safe_dump(minion, default_flow_style=False)

0 comments on commit 3951a53

Please sign in to comment.
Something went wrong with that request. Please try again.