mirror of
https://github.com/GNS3/gns3-server
synced 2025-05-08 18:08:55 +00:00
Fix crash when a n hypervisor return no body
This commit is contained in:
parent
757ee34dac
commit
aa6c44a470
@ -148,7 +148,7 @@ class Hypervisor:
|
|||||||
raise aiohttp.web.HTTPConflict(text="Conflict {} {}".format(url, body))
|
raise aiohttp.web.HTTPConflict(text="Conflict {} {}".format(url, body))
|
||||||
else:
|
else:
|
||||||
raise NotImplemented("{} status code is not supported".format(e.status))
|
raise NotImplemented("{} status code is not supported".format(e.status))
|
||||||
if len(body):
|
if body and len(body):
|
||||||
try:
|
try:
|
||||||
response.json = json.loads(body)
|
response.json = json.loads(body)
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
|
Loading…
Reference in New Issue
Block a user