1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-20 07:18:07 +00:00

Remove noise from log when VMware is not installed

This commit is contained in:
Julien Duponchelle 2017-02-28 11:42:07 +01:00
parent ec6411f730
commit da8811515d
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -222,8 +222,14 @@ class GNS3VM:
""" """
engine = self._get_engine(engine) engine = self._get_engine(engine)
vms = [] vms = []
for vm in (yield from engine.list()): try:
vms.append({"vmname": vm["vmname"]}) for vm in (yield from engine.list()):
vms.append({"vmname": vm["vmname"]})
except GNS3VMError as e:
# We raise error only if user activated the GNS3 VM
# otherwise you have noise when VMware is not installed
if self.enable:
raise e
return vms return vms
@asyncio.coroutine @asyncio.coroutine