Fix issue when images are not uploaded from appliance wizard. Ref https://github.com/GNS3/gns3-gui/issues/2738

This commit is contained in:
grossmj committed 2019-03-18 15:33:37 +07:00
1 parent 4e396ac690
commit 03401a477e
4 files changed
+9 -12

No files matched your search

+4 -6
View File
@@ -27,7 +27,6 @@ import io
from operator import itemgetter
from ..utils import parse_version
from ..utils.images import list_images
from ..utils.asyncio import locking
from ..controller.controller_error import ControllerError
from ..version import __version__, __version_info__
@@ -571,8 +570,7 @@ class Compute:
async def images(self, type):
"""
Return the list of images available for this type on controller
and on the compute node.
Return the list of images available for this type on the compute node.
"""
images = []
@@ -581,9 +579,9 @@ class Compute:
try:
if type in ["qemu", "dynamips", "iou"]:
for local_image in list_images(type):
if local_image['filename'] not in [i['filename'] for i in images]:
images.append(local_image)
#for local_image in list_images(type):
# if local_image['filename'] not in [i['filename'] for i in images]:
# images.append(local_image)
images = sorted(images, key=itemgetter('filename'))
else:
images = sorted(images, key=itemgetter('image'))