Skip to content

Commit

Permalink
Merge pull request #5 from twangboy/fix_clean
Browse files Browse the repository at this point in the history
Fix vistara error on master initialization
  • Loading branch information
s0undt3ch committed May 20, 2016
2 parents 49eba6b + 1c22cf4 commit 05b6b4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
7 changes: 3 additions & 4 deletions salt/pillar/cmd_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ def ext_pillar(minion_id, # pylint: disable=W0613
'''
try:
command = command.replace('%s', minion_id)
return yaml.safe_load(__salt__['cmd.run']('{0}'.format(command)))
return yaml.safe_load(
__salt__['cmd.run_stdout']('{0}'.format(command), python_shell=True))
except Exception:
log.critical(
'YAML data from {0} failed to parse'.format(command)
)
log.critical('YAML data from {0} failed to parse'.format(command))
return {}
14 changes: 6 additions & 8 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,14 +990,12 @@ def transplant_configs(cls, transport='zeromq'):
TMP_PRODENV_STATE_TREE
]
}
master_opts['ext_pillar'].append(
{'cmd_yaml': 'cat {0}'.format(
os.path.join(
FILES,
'ext.yaml'
)
)}
)
if salt.utils.is_windows():
master_opts['ext_pillar'].append(
{'cmd_yaml': 'type {0}'.format(os.path.join(FILES, 'ext.yaml'))})
else:
master_opts['ext_pillar'].append(
{'cmd_yaml': 'cat {0}'.format(os.path.join(FILES, 'ext.yaml'))})

# We need to copy the extension modules into the new master root_dir or
# it will be prefixed by it
Expand Down

0 comments on commit 05b6b4e

Please sign in to comment.