Fix incorrect Qemu binary selected when importing template. Fixes https://github.com/GNS3/gns3-gui/issues/3216

This commit is contained in:
grossmj 2021-08-24 17:26:06 +09:30
parent c4c71cc838
commit 92150fba71

View File

@ -152,8 +152,6 @@ class Qemu(BaseManager):
log.debug("Searching for Qemu binaries in '{}'".format(path)) log.debug("Searching for Qemu binaries in '{}'".format(path))
try: try:
for f in os.listdir(path): for f in os.listdir(path):
if f.endswith("-spice"):
continue
if (f.startswith("qemu-system") or f.startswith("qemu-kvm") or f == "qemu" or f == "qemu.exe") and \ if (f.startswith("qemu-system") or f.startswith("qemu-kvm") or f == "qemu" or f == "qemu.exe") and \
os.access(os.path.join(path, f), os.X_OK) and \ os.access(os.path.join(path, f), os.X_OK) and \
os.path.isfile(os.path.join(path, f)): os.path.isfile(os.path.join(path, f)):