Skip to content
Snippets Groups Projects
Commit c4c1a460 authored by Daniel Fullmer's avatar Daniel Fullmer Committed by Chris Lamb
Browse files

Fix CBFS comparator with our_check_output()

The cbfs tests were broken by fe446ea2
They would fail with:
TypeError: a bytes-like object is required, not 'str'

Additionally, our_check_output() can't accept a stdout= argument since
subprocess.check_output doesn't accept this argument.
parent 3b1a9baa
No related branches found
No related tags found
No related merge requests found
Pipeline #147805 failed
......@@ -54,7 +54,7 @@ class CbfsContainer(Archive):
@tool_required("cbfstool")
def entries(self, path):
cmd = ["cbfstool", path, "print"]
output = our_check_output(cmd)
output = our_check_output(cmd).decode("utf-8")
header = True
for line in output.rstrip("\n").split("\n"):
if header:
......@@ -88,9 +88,7 @@ class CbfsContainer(Archive):
dest_path,
]
logger.debug("cbfstool extract %s to %s", member_name, dest_path)
our_check_output(
cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL
)
our_check_output(cmd, stderr=subprocess.DEVNULL)
return dest_path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment