Yedidyah Bar David has uploaded a new change for review.

Change subject: packaging: setup: check service status by rc
......................................................................

packaging: setup: check service status by rc

Before this change, the status of services was checked by searching for
keywords in the output of 'service $service status'. This didn't work
well on locales where the output did not contain the expected keywords.
With this change we only check the return code of that command.

Bug-Url: https://bugzilla.redhat.com/1074909
Change-Id: I3c7365cb7947a2d79bfaffa669f28ae4a8aa3ba3
Signed-off-by: Yedidyah Bar David <[email protected]>
---
M packaging/common_utils.py
1 file changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-reports refs/changes/97/25597/1

diff --git a/packaging/common_utils.py b/packaging/common_utils.py
index 308ba99..5a24b36 100755
--- a/packaging/common_utils.py
+++ b/packaging/common_utils.py
@@ -232,14 +232,7 @@
     def status(self):
         logging.debug("getting status for %s", self.name)
         (output, rc) = self._serviceFacility("status")
-        for st in ('dead', 'inactive', 'stopped'):
-            if st in output:
-                self.lastStateUp = False
-                break
-        else:
-            for st in ('running', 'active'):
-                if st in output:
-                    self.lastStateUp = True
+        self.lastStateUp = (rc == 0)
         return (output, rc)
 
     def _serviceFacility(self, action):


-- 
To view, visit http://gerrit.ovirt.org/25597
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c7365cb7947a2d79bfaffa669f28ae4a8aa3ba3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-reports
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Yedidyah Bar David <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to