mirror of
https://github.com/projectatomic/atomic.git
synced 2026-02-06 03:45:28 +01:00
syscontainers.py: decode systemctl output
Closes: #684 Approved by: cgwalters
This commit is contained in:
committed by
Atomic Bot
parent
00375f2a57
commit
b227b2a8b3
@@ -695,7 +695,7 @@ class SystemContainers(object):
|
||||
try:
|
||||
is_failed = self._systemctl_command("is-failed", name, quiet=True).replace("\n", "")
|
||||
except subprocess.CalledProcessError as e:
|
||||
is_failed = e.output
|
||||
is_failed = e.output.decode('utf-8')
|
||||
if is_failed.replace("\n", "") != "inactive":
|
||||
return True
|
||||
|
||||
@@ -708,7 +708,7 @@ class SystemContainers(object):
|
||||
try:
|
||||
status = self._systemctl_command("status", name, quiet=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
status = e.output
|
||||
status = e.output.decode('utf-8')
|
||||
if 'FAILURE' in status:
|
||||
return True
|
||||
else:
|
||||
@@ -742,7 +742,7 @@ class SystemContainers(object):
|
||||
if not quiet:
|
||||
util.write_out(" ".join(cmd))
|
||||
if not self.display:
|
||||
return util.check_output(cmd, stderr=DEVNULL)
|
||||
return util.check_output(cmd, stderr=DEVNULL).decode('utf-8')
|
||||
return None
|
||||
|
||||
def get_checkout(self, name):
|
||||
|
||||
Reference in New Issue
Block a user