So output of the subprocesses go through the appropriate
channels rather than to stdout/err.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 client/shared/software_manager.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/client/shared/software_manager.py 
b/client/shared/software_manager.py
index df37e9e..33238b2 100755
--- a/client/shared/software_manager.py
+++ b/client/shared/software_manager.py
@@ -201,7 +201,11 @@ class RpmBackend(BaseBackend):
             return self._check_installed_version(name, version)
         else:
             cmd = 'rpm -q ' + name + ' 2> /dev/null'
-            return (os.system(cmd) == 0)
+            try:
+                utils.run(cmd, verbose=False)
+                return True
+            except error.CmdError:
+                return False
 
 
     def list_all(self):
-- 
1.8.0

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to