From 5c0c3da01e3e64e7614d9d3cc52d8d9c18a06230 Mon Sep 17 00:00:00 2001 From: rallytime Date: Tue, 23 Feb 2016 17:26:52 -0700 Subject: [PATCH 32/33] Add error check when retcode is 0, but stderr is present --- salt/modules/rpm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/salt/modules/rpm.py b/salt/modules/rpm.py index cdf91a6..00cbd5d 100644 --- a/salt/modules/rpm.py +++ b/salt/modules/rpm.py @@ -485,6 +485,8 @@ def info(*packages, **attr): if 'stderr' in call: comment += (call['stderr'] or call['stdout']) raise CommandExecutionError('{0}'.format(comment)) + elif 'error' in call['stderr']: + raise CommandExecutionError(call['stderr']) else: out = call['stdout'] -- 2.1.4