mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge pull request #2055 from GNS3/remove-qemu-binaries-requirement
Remove Qemu binary requirement
This commit is contained in:
6 files changed
+27
-95
No files matched your search
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user