mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-01 04:38:12 +00:00
parent
f151181409
commit
d1de665939
@ -101,14 +101,17 @@ class Docker(BaseManager):
|
|||||||
"""
|
"""
|
||||||
data = json.dumps(data)
|
data = json.dumps(data)
|
||||||
url = "http://docker/" + path
|
url = "http://docker/" + path
|
||||||
response = yield from aiohttp.request(
|
try:
|
||||||
method,
|
response = yield from aiohttp.request(
|
||||||
url,
|
method,
|
||||||
connector=(yield from self.connector()),
|
url,
|
||||||
params=params,
|
connector=(yield from self.connector()),
|
||||||
data=data,
|
params=params,
|
||||||
headers={"content-type": "application/json", },
|
data=data,
|
||||||
)
|
headers={"content-type": "application/json", },
|
||||||
|
)
|
||||||
|
except aiohttp.ClientResponseError as e:
|
||||||
|
raise DockerError("Docker has returned an error: {}".format(str(e)))
|
||||||
if response.status >= 300:
|
if response.status >= 300:
|
||||||
body = yield from response.read()
|
body = yield from response.read()
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user