Skip to contentSkip to conversation

fetch2: fix unpacking of deb packages

PATCH New Stephano Cetola 1 participant 1 message Jun 10, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2: fix unpacking of deb packages

Python 3 changed the return value of check_output to binary rather than a string. This fix decodes the binary before calling splitlines, which requires a string.

---
 lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/__init__.py +1 -1
index f612318..a63498a 100644
@@ -1395,7 +1395,7 @@ class FetchMethod(object):
                 output = subprocess.check_output('ar -t %s' % file, preexec_fn=subprocess_setup, shell=True)
                 datafile = None
                 if output:
-                    for line in output.splitlines():
+                    for line in output.decode().splitlines():
                         if line.startswith('data.tar.'):
                             datafile = line
                             break
Signature · 1 line
2.8.3