Merge pull request #2055 from GNS3/remove-qemu-binaries-requirement

Remove Qemu binary requirement
This commit is contained in:
Jeremy Grossmann authored and GitHub committed 2022-06-06 14:51:07 +08:00
commit 3b7dfe5929
6 files changed
+27 -95

No files matched your search

-24
View File
@@ -159,30 +159,6 @@ class Qemu(BaseManager):
return qemus
@staticmethod
async def img_binary_list():
"""
Gets QEMU-img binaries list available on the host.
:returns: Array of dictionary {"path": Qemu-img binary path, "version": version of Qemu-img}
"""
qemu_imgs = []
for path in Qemu.paths_list():
try:
for f in os.listdir(path):
if (
(f == "qemu-img" or f == "qemu-img.exe")
and os.access(os.path.join(path, f), os.X_OK)
and os.path.isfile(os.path.join(path, f))
):
qemu_path = os.path.join(path, f)
version = await Qemu._get_qemu_img_version(qemu_path)
qemu_imgs.append({"path": qemu_path, "version": version})
except OSError:
continue
return qemu_imgs
@staticmethod
async def get_qemu_version(qemu_path):
"""