mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Allow user to set console port
This commit is contained in:
1 parent
57c3463edc
commit
649d4e5143
8 files changed
+27
-14
No files matched your search
@@ -49,6 +49,8 @@ class Response(aiohttp.web.Response):
|
||||
try:
|
||||
jsonschema.validate(answer, self._output_schema)
|
||||
except jsonschema.ValidationError as e:
|
||||
log.error("Invalid output schema")
|
||||
log.error("Invalid output schema {} '{}' in schema: {}".format(e.validator,
|
||||
e.validator_value,
|
||||
json.dumps(e.schema)))
|
||||
raise aiohttp.web.HTTPBadRequest(text="{}".format(e))
|
||||
self.body = json.dumps(answer, indent=4, sort_keys=True).encode('utf-8')
|
||||
@@ -40,7 +40,9 @@ def parse_request(request, input_schema):
|
||||
try:
|
||||
jsonschema.validate(request.json, input_schema)
|
||||
except jsonschema.ValidationError as e:
|
||||
log.error("Invalid input schema")
|
||||
log.error("Invalid input schema {} '{}' in schema: {}".format(e.validator,
|
||||
e.validator_value,
|
||||
json.dumps(e.schema)))
|
||||
raise aiohttp.web.HTTPBadRequest(text="Request is not {} '{}' in schema: {}".format(
|
||||
e.validator,
|
||||
e.validator_value,
|
||||
|
||||
Reference in new issue
Block a user