Skip to content

Commit

Permalink
Fix install_vm.py on older versions of Python
Browse files Browse the repository at this point in the history
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.

This is a backport of #10651.

Fixes: #10650
  • Loading branch information
jan-cerny committed May 30, 2023
1 parent 28ed234 commit 9f1f86b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/install_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 9f1f86b

Please sign in to comment.