mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Add error logging when 'yum list available' returns nonzero exit status
See https://github.com/saltstack/salt/pull/29496/files#r47160364 CC: @SEJeff
This commit is contained in:
parent
263135b61c
commit
b68c6614f1
@ -379,6 +379,11 @@ def latest_version(*names, **kwargs):
|
||||
ignore_retcode=True,
|
||||
python_shell=False)
|
||||
if out['retcode'] != 0 and 'Error:' in out:
|
||||
if out['stderr']:
|
||||
log.error(
|
||||
'Problem encountered getting list of available updates. '
|
||||
'Stderr follows: {0}'.format(out['stderr'])
|
||||
)
|
||||
return []
|
||||
# Find end of first line so we can skip it
|
||||
header_end = out['stdout'].find('\n')
|
||||
|
Loading…
Reference in New Issue
Block a user