From eefc771fa860d8f20381a138fea22666e3589c22 Mon Sep 17 00:00:00 2001 From: Giulia Naponiello Date: Oct 01 2019 08:35:20 +0000 Subject: py2 to py3, handle byte strings Signed-off-by: Giulia Naponiello --- diff --git a/freshmaker/utils.py b/freshmaker/utils.py index 72d8e08..2eb1f63 100644 --- a/freshmaker/utils.py +++ b/freshmaker/utils.py @@ -281,7 +281,7 @@ def get_distgit_files( commit_or_branch, f] tar_data = _run_command(cmd, logger=logger, return_output=True, log_output=False) - tar_bytes = io.BytesIO(tar_data) + tar_bytes = io.BytesIO(tar_data.encode()) tar = tarfile.open(fileobj=tar_bytes) for member in tar.getmembers(): ret[member.name] = tar.extractfile(member).read()