mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 07:01:47 +01:00
Merge pull request #3889 from bentiss/fix-openapi
openapi: actually catch the error when esprima fails at parsing the file
This commit is contained in:
commit
4c29b72242
1 changed files with 5 additions and 0 deletions
|
|
@ -821,6 +821,11 @@ def parse_schemas(schemas_dir):
|
||||||
for filename in files:
|
for filename in files:
|
||||||
path = os.path.join(root, filename)
|
path = os.path.join(root, filename)
|
||||||
context = parse_file(path)
|
context = parse_file(path)
|
||||||
|
|
||||||
|
if context is None:
|
||||||
|
# the file doesn't contain a schema (see above)
|
||||||
|
continue
|
||||||
|
|
||||||
program = context.program
|
program = context.program
|
||||||
|
|
||||||
current_schema = None
|
current_schema = None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue