fixed errors in builder_image

master 3.7.1.2
idziubenko 3 years ago
parent 0f6847d4e9
commit 077a08db24

@ -489,12 +489,10 @@ class typeFile():
def getMTypeBuf_(self, buf):
try:
ret = self.magicObject.buffer(buf)
ret = self.magicObject.buffer(buf).decode('utf-8')
except UnicodeDecodeError:
try:
ret = self.magicObject.buffer(buf.decode('utf-8'))
except UnicodeDecodeError:
return None
ret = self.magicObject.buffer(buf)
return None
return ret
def getMTypeBuf(self, buf):

@ -92,7 +92,7 @@ class InitrdFile():
stderr=PIPE, close_fds=True)
try:
for fn in cpio.stdout:
yield fn.rstrip()
yield fn.rstrip().decode("UTF-8")
finally:
cpio.terminate()
gz.terminate()

Loading…
Cancel
Save