Skip to content

Commit

Permalink
sonic-installer: fix py3 issues in bootloader.aboot (#1553)
Browse files Browse the repository at this point in the history
These issues are only seen on secureboot enabled platform.
  • Loading branch information
Staphylo authored Apr 10, 2021
1 parent 02b263a commit 38f9f60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sonic_installer/bootloader/aboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def getCert(cls, swiFile):
return None
with swi.open(sigInfo, 'r') as sigFile:
for line in sigFile:
data = line.split(':')
data = line.decode('utf8').split(':')
if len(data) == 2:
if data[0] == ISSUERCERT:
try:
Expand Down Expand Up @@ -197,7 +197,7 @@ def get_rootfs_path(self, image_path):

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

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

0 comments on commit 38f9f60

Please sign in to comment.