mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-31 05:13:49 +02:00
parent
1080147cf5
commit
048d2c12d0
@ -539,6 +539,7 @@ class Compute:
|
|||||||
res = yield from self.http_query("GET", "/{}/images".format(type), timeout=120)
|
res = yield from self.http_query("GET", "/{}/images".format(type), timeout=120)
|
||||||
images = res.json
|
images = res.json
|
||||||
|
|
||||||
|
try:
|
||||||
if type in ["qemu", "dynamips", "iou"]:
|
if type in ["qemu", "dynamips", "iou"]:
|
||||||
for path in scan_for_images(type):
|
for path in scan_for_images(type):
|
||||||
image = os.path.basename(path)
|
image = os.path.basename(path)
|
||||||
@ -548,6 +549,8 @@ class Compute:
|
|||||||
"md5sum": md5sum(path),
|
"md5sum": md5sum(path),
|
||||||
"filesize": os.stat(path).st_size
|
"filesize": os.stat(path).st_size
|
||||||
})
|
})
|
||||||
|
except OSError as e:
|
||||||
|
raise aiohttp.web.HTTPConflict(text="Can't scan for images: {}".format(str(e)))
|
||||||
return images
|
return images
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
Loading…
Reference in New Issue
Block a user