mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #41206 from skizunov/develop2
opkg may return non-zero but empty stderr
This commit is contained in:
commit
409a16c5f1
@ -151,8 +151,10 @@ def refresh_db():
|
||||
python_shell=False)
|
||||
if call['retcode'] != 0:
|
||||
comment = ''
|
||||
if 'stderr' in call:
|
||||
if call['stderr']:
|
||||
comment += call['stderr']
|
||||
else:
|
||||
comment += call['stdout']
|
||||
|
||||
raise CommandExecutionError(
|
||||
'{0}'.format(comment)
|
||||
@ -348,8 +350,11 @@ def install(name=None,
|
||||
output_loglevel='trace',
|
||||
python_shell=False
|
||||
)
|
||||
if out['retcode'] != 0 and out['stderr']:
|
||||
errors.append(out['stderr'])
|
||||
if out['retcode'] != 0:
|
||||
if out['stderr']:
|
||||
errors.append(out['stderr'])
|
||||
else:
|
||||
errors.append(out['stdout'])
|
||||
|
||||
__context__.pop('pkg.list_pkgs', None)
|
||||
new = list_pkgs()
|
||||
@ -406,8 +411,11 @@ def remove(name=None, pkgs=None, **kwargs): # pylint: disable=unused-argument
|
||||
output_loglevel='trace',
|
||||
python_shell=False
|
||||
)
|
||||
if out['retcode'] != 0 and out['stderr']:
|
||||
errors = [out['stderr']]
|
||||
if out['retcode'] != 0:
|
||||
if out['stderr']:
|
||||
errors = [out['stderr']]
|
||||
else:
|
||||
errors = [out['stdout']]
|
||||
else:
|
||||
errors = []
|
||||
|
||||
@ -885,8 +893,10 @@ def info_installed(*names, **kwargs):
|
||||
python_shell=False)
|
||||
if call['retcode'] != 0:
|
||||
comment = ''
|
||||
if 'stderr' in call:
|
||||
if call['stderr']:
|
||||
comment += call['stderr']
|
||||
else:
|
||||
comment += call['stdout']
|
||||
|
||||
raise CommandExecutionError(
|
||||
'{0}'.format(comment)
|
||||
@ -900,8 +910,10 @@ def info_installed(*names, **kwargs):
|
||||
python_shell=False)
|
||||
if call['retcode'] != 0:
|
||||
comment = ''
|
||||
if 'stderr' in call:
|
||||
if call['stderr']:
|
||||
comment += call['stderr']
|
||||
else:
|
||||
comment += call['stdout']
|
||||
|
||||
raise CommandExecutionError(
|
||||
'{0}'.format(comment)
|
||||
|
Loading…
Reference in New Issue
Block a user