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

Fix reading response embedded in ComputeConflictError

This commit is contained in:
grossmj 2022-05-27 15:58:14 +07:00
parent 944a72254c
commit 85cdd7d9a5

View File

@ -405,8 +405,9 @@ class Node:
f"/projects/{self._project.id}/{self._node_type}/nodes", data=data, timeout=timeout
)
except ComputeConflictError as e:
if e.response.get("exception") == "ImageMissingError":
res = await self._upload_missing_image(self._node_type, e.response["image"])
response = e.response()
if response.get("exception") == "ImageMissingError":
res = await self._upload_missing_image(self._node_type, response["image"])
if not res:
raise e
else: