mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Catch exceptions when computing image checksums. Ref https://github.com/GNS3/gns3-server/issues/2228
This commit is contained in:
parent
2f765747b8
commit
596d1274a3
@ -240,9 +240,12 @@ class WebServer:
|
|||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
with concurrent.futures.ProcessPoolExecutor(max_workers=1) as pool:
|
with concurrent.futures.ProcessPoolExecutor(max_workers=1) as pool:
|
||||||
log.info("Computing image checksums...")
|
try:
|
||||||
await loop.run_in_executor(pool, list_images, "qemu")
|
log.info("Computing image checksums...")
|
||||||
log.info("Finished computing image checksums")
|
await loop.run_in_executor(pool, list_images, "qemu")
|
||||||
|
log.info("Finished computing image checksums")
|
||||||
|
except OSError as e:
|
||||||
|
log.warning("Could not compute image checksums: {}".format(e))
|
||||||
|
|
||||||
async def _on_startup(self, *args):
|
async def _on_startup(self, *args):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user