From a52ab24ec4b8f036038e4488255792f553931c6a Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sun, 3 Mar 2024 10:23:33 -0500 Subject: [PATCH] createvm: Replace deprecated pkgutil.find_loader importlib.util.find_spec is around since python 3.4 Signed-off-by: Cole Robinson --- virtManager/createvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virtManager/createvm.py b/virtManager/createvm.py index 95aff71b2..b352739df 100644 --- a/virtManager/createvm.py +++ b/virtManager/createvm.py @@ -4,8 +4,8 @@ # This work is licensed under the GNU GPLv2 or later. # See the COPYING file in the top-level directory. +import importlib import io -import pkgutil import os import threading import time @@ -79,7 +79,7 @@ def _pretty_memory(mem): ########################################################### def is_virt_bootstrap_installed(conn): - ret = pkgutil.find_loader('virtBootstrap') is not None + ret = importlib.util.find_spec('virtBootstrap') is not None return ret or conn.config.CLITestOptions.fake_virtbootstrap