Revert "scylla_util.py: return bool value on systemd_unit.is_active()"

This reverts commit 2545d7fd43.

Fixes #9627
Fixes scylladb/scylla-machine-image#241
This commit is contained in:
Takuya ASADA
2021-11-15 19:25:29 +09:00
parent 4950ce539c
commit d646673705

View File

@@ -1041,7 +1041,7 @@ class systemd_unit:
return run('systemctl {} disable {}'.format(self.ctlparam, self._unit), shell=True, check=True)
def is_active(self):
return True if run('systemctl {} is-active {}'.format(self.ctlparam, self._unit), shell=True, capture_output=True, encoding='utf-8').stdout.strip() == 'active' else False
return run('systemctl {} is-active {}'.format(self.ctlparam, self._unit), shell=True, capture_output=True, encoding='utf-8').stdout.strip()
def mask(self):
return run('systemctl {} mask {}'.format(self.ctlparam, self._unit), shell=True, check=True)