mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
qemurunner.py: fix error message about qmp
The error message is a little misleading as the qmp module is a directory with __init__.py file, not qmp.py file. Also, put the path where we try to import it from in the error message to make the message more indicative. (From OE-Core rev: 08bacbf797f6a50ae8abe8fc3455b3a15a0a94b3) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -188,7 +188,7 @@ class QemuRunner:
|
|||||||
def launch(self, launch_cmd, get_ip = True, qemuparams = None, extra_bootparams = None, env = None):
|
def launch(self, launch_cmd, get_ip = True, qemuparams = None, extra_bootparams = None, env = None):
|
||||||
# use logfile to determine the recipe-sysroot-native path and
|
# use logfile to determine the recipe-sysroot-native path and
|
||||||
# then add in the site-packages path components and add that
|
# then add in the site-packages path components and add that
|
||||||
# to the python sys.path so qmp.py can be found.
|
# to the python sys.path so the qmp module can be found.
|
||||||
python_path = os.path.dirname(os.path.dirname(self.logfile))
|
python_path = os.path.dirname(os.path.dirname(self.logfile))
|
||||||
python_path += "/recipe-sysroot-native/usr/lib/qemu-python"
|
python_path += "/recipe-sysroot-native/usr/lib/qemu-python"
|
||||||
sys.path.append(python_path)
|
sys.path.append(python_path)
|
||||||
@@ -196,7 +196,7 @@ class QemuRunner:
|
|||||||
try:
|
try:
|
||||||
qmp = importlib.import_module("qmp")
|
qmp = importlib.import_module("qmp")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.error("qemurunner: qmp.py missing, please ensure it's installed (%s)" % str(e))
|
self.logger.error("qemurunner: qmp module missing, please ensure it's installed in %s (%s)" % (python_path, str(e)))
|
||||||
return False
|
return False
|
||||||
# Path relative to tmpdir used as cwd for qemu below to avoid unix socket path length issues
|
# Path relative to tmpdir used as cwd for qemu below to avoid unix socket path length issues
|
||||||
qmp_file = "." + next(tempfile._get_candidate_names())
|
qmp_file = "." + next(tempfile._get_candidate_names())
|
||||||
|
|||||||
Reference in New Issue
Block a user