fix(coreos-efibootguard.py): fix the script for older python version

On the BIL build container (python v3.8) the script throws an error
which is fixed now.
This commit is contained in:
Patrick Vogelaar 2023-04-25 15:28:27 +02:00
parent fa35089782
commit c003449178
1 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@ from devtool import setup_tinfoil, parse_recipe
from dataclasses import dataclass from dataclasses import dataclass
from pathlib import Path from pathlib import Path
from shlex import quote from shlex import quote
from typing import List
def register_commands(subparsers, context): def register_commands(subparsers, context):
"""Register devtool subcommands from this plugin""" """Register devtool subcommands from this plugin"""
@ -125,7 +126,7 @@ class UKIGeneratorArgs:
f"keydir: {self.keydir}\n" f"keydir: {self.keydir}\n"
) )
def get_buid_cmd(self) -> list[str]: def get_buid_cmd(self) -> List[str]:
""" """
Return the command needed to build the UKI as an array Return the command needed to build the UKI as an array
""" """
@ -141,7 +142,7 @@ class UKIGeneratorArgs:
args += ["--dtb", dtb] args += ["--dtb", dtb]
return args return args
def get_sign_cmd(self) -> list[str]: def get_sign_cmd(self) -> List[str]:
""" """
Return the command needed to sign the UKI in place as an array Return the command needed to sign the UKI in place as an array
""" """
@ -213,7 +214,7 @@ def printi(txt, indent=1, *, iprefix=" ", end="\n"):
print(textwrap.indent(txt, iprefix * indent), end=end) print(textwrap.indent(txt, iprefix * indent), end=end)
def dtb_to_list(dtb, deploy_dir) -> list[str]: def dtb_to_list(dtb, deploy_dir) -> List[str]:
""" """
Convert the string array from bitbake into a python list. Only the basename Convert the string array from bitbake into a python list. Only the basename
of the dtb is taken and DEPLOY_DIR is appended of the dtb is taken and DEPLOY_DIR is appended