From 8d2c47d75ee34f3f671501ada70c88b4100c8911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= Date: Mon, 29 May 2023 16:39:37 +0200 Subject: [PATCH] Fix install_vm.py on older versions of Python We will remove the type hints that use collections. According to https://peps.python.org/pep-0585/, the "Type Hinting Generics In Standard Collections" were introduced in Python 3.9, but RHEL 8 and 7 use Python 3.6. Fixes: https://github.com/ComplianceAsCode/content/issues/10650 --- tests/install_vm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/install_vm.py b/tests/install_vm.py index daa3234a429..d00a13c11a9 100755 --- a/tests/install_vm.py +++ b/tests/install_vm.py @@ -280,7 +280,7 @@ def join_extented_opt(opt_name, delim, opts): return [] -def get_virt_install_command(data) -> list[str]: +def get_virt_install_command(data): command = [ "virt-install", "--connect={0}".format(data.libvirt), @@ -335,7 +335,7 @@ def get_virt_install_command(data) -> list[str]: return command -def run_virt_install(data, command) -> None: +def run_virt_install(data, command): if data.dry: print("\nThe following command would be used for the VM installation:") print(shlex.join(command))