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/1067673 Change-Id: I306dfb6cf069c26a59e1d9a0d4678a1888300784 Signed-off-by: Yedidyah Bar David <d...@redhat.com> --- M packaging/common_utils.py 1 file changed, 1 insertion(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-dwh refs/changes/55/25455/1 diff --git a/packaging/common_utils.py b/packaging/common_utils.py index 7efb11d..d6733fb 100755 --- a/packaging/common_utils.py +++ b/packaging/common_utils.py @@ -259,14 +259,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/25455 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I306dfb6cf069c26a59e1d9a0d4678a1888300784 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-dwh Gerrit-Branch: ovirt-3.3 Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches