mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #15203 from terminalmage/fix-chcocolatey-exception
A more correct fix for 82cf61a
This commit is contained in:
commit
bff1dfd881
@ -47,7 +47,7 @@ def _find_chocolatey():
|
||||
'''
|
||||
try:
|
||||
return __context__['chocolatey._path']
|
||||
except KeyError as err:
|
||||
except KeyError:
|
||||
choc_defaults = ['C:\\Chocolatey\\bin\\chocolatey.bat',
|
||||
'C:\\ProgramData\\Chocolatey\\bin\\chocolatey.exe', ]
|
||||
|
||||
@ -57,7 +57,7 @@ def _find_chocolatey():
|
||||
if __salt__['cmd.has_exec'](choc_dir):
|
||||
choc_path = choc_dir
|
||||
if not choc_path:
|
||||
msg = ('Chocolatey not installed. Use chocolatey.bootstrap to '
|
||||
err = ('Chocolatey not installed. Use chocolatey.bootstrap to '
|
||||
'install the Chocolatey package manager.')
|
||||
log.error(err)
|
||||
raise CommandExecutionError(err)
|
||||
|
Loading…
Reference in New Issue
Block a user