From fcedf0fcffe1c15c6594442a299912b99017d911 Mon Sep 17 00:00:00 2001 From: Xiaodai Wang Date: Mon, 3 Jun 2024 16:31:57 +0800 Subject: [PATCH] v2v: fix ovirt module import issue Only import ovirt module when necessary Signed-off-by: Xiaodai Wang --- v2v/tests/src/function_test_esx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2v/tests/src/function_test_esx.py b/v2v/tests/src/function_test_esx.py index 8dcc8c719b..8c07c1aac6 100644 --- a/v2v/tests/src/function_test_esx.py +++ b/v2v/tests/src/function_test_esx.py @@ -4,7 +4,6 @@ import uuid import shutil import tempfile -import ovirtsdk4 import xml.etree.ElementTree as ET from virttest import data_dir @@ -750,6 +749,7 @@ def vm_check(status_error): os.environ['http_proxy'] = http_proxy os.environ['https_proxy'] = https_proxy if 'ovirtsdk4_pkg' in checkpoint: + import ovirtsdk4 ovirt4_path = os.path.dirname(ovirtsdk4.__file__) dst_ovirt4_path = ovirt4_path + '.bak' os.rename(ovirt4_path, dst_ovirt4_path)