Test image sorting

Ref https://github.com/GNS3/gns3-gui/issues/2030
This commit is contained in:
Julien Duponchelle committed 2017-05-05 20:09:51 +02:00
1 parent 8a6584d90f
commit bfee08459d
2 files changed
+6 -3

No files matched your search

+2 -1
View File
@@ -23,6 +23,7 @@ import json
import uuid
import sys
import io
from operator import itemgetter
from ..utils import parse_version
from ..utils.images import list_images
@@ -602,7 +603,7 @@ class Compute:
images.append(local_image)
except OSError as e:
raise ComputeError("Can't list images: {}".format(str(e)))
images.sort()
images = sorted(images, key=itemgetter('filename'))
return images
@asyncio.coroutine