Skip to content

Commit

Permalink
Fix unhandled KeyError exception when starting Docker container. Ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Nov 4, 2021
1 parent 1067e60 commit b1a62df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gns3server/compute/docker/__init__.py
Expand Up @@ -111,7 +111,7 @@ async def query(self, method, path, data={}, params={}):
body = await response.read()
response.close()
if body and len(body):
if response.headers['CONTENT-TYPE'] == 'application/json':
if response.headers.get('CONTENT-TYPE') == 'application/json':
body = json.loads(body.decode("utf-8"))
else:
body = body.decode("utf-8")
Expand Down
2 changes: 1 addition & 1 deletion gns3server/compute/docker/docker_vm.py
Expand Up @@ -94,7 +94,7 @@ def __init__(self, name, node_id, project, manager, image, console=None, aux=Non
self._console_websocket = None
self._extra_hosts = extra_hosts
self._extra_volumes = extra_volumes or []
self._permissions_fixed = False
self._permissions_fixed = True
self._display = None
self._closing = False

Expand Down

0 comments on commit b1a62df

Please sign in to comment.