Skip to content

Commit 38f9f60

Browse files
authored
sonic-installer: fix py3 issues in bootloader.aboot (sonic-net#1553)
These issues are only seen on secureboot enabled platform.
1 parent 02b263a commit 38f9f60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sonic_installer/bootloader/aboot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def getCert(cls, swiFile):
156156
return None
157157
with swi.open(sigInfo, 'r') as sigFile:
158158
for line in sigFile:
159-
data = line.split(':')
159+
data = line.decode('utf8').split(':')
160160
if len(data) == 2:
161161
if data[0] == ISSUERCERT:
162162
try:
@@ -197,7 +197,7 @@ def get_rootfs_path(self, image_path):
197197

198198
swipath = os.path.join(image_path, DEFAULT_SWI_IMAGE)
199199
offset = self._get_swi_file_offset(swipath, ROOTFS_NAME)
200-
loopdev = subprocess.check_output(['losetup', '-f']).rstrip()
200+
loopdev = subprocess.check_output(['losetup', '-f']).decode('utf8').rstrip()
201201

202202
try:
203203
run_command_or_raise(['losetup', '-o', str(offset), loopdev, swipath])

0 commit comments

Comments
 (0)