mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
createvm: Replace deprecated pkgutil.find_loader
importlib.util.find_spec is around since python 3.4 Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
0c899a7ccd
commit
a52ab24ec4
@ -4,8 +4,8 @@
|
|||||||
# This work is licensed under the GNU GPLv2 or later.
|
# This work is licensed under the GNU GPLv2 or later.
|
||||||
# See the COPYING file in the top-level directory.
|
# See the COPYING file in the top-level directory.
|
||||||
|
|
||||||
|
import importlib
|
||||||
import io
|
import io
|
||||||
import pkgutil
|
|
||||||
import os
|
import os
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
@ -79,7 +79,7 @@ def _pretty_memory(mem):
|
|||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
def is_virt_bootstrap_installed(conn):
|
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
|
return ret or conn.config.CLITestOptions.fake_virtbootstrap
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user