mirror of
https://github.com/capnproto/pycapnp.git
synced 2025-03-04 08:24:43 +01:00
Adding capnp extension validation check
- To catch odd import problems on Windows
This commit is contained in:
parent
964f514180
commit
62eccff150
1 changed files with 3 additions and 0 deletions
|
@ -3213,6 +3213,9 @@ cdef class SchemaParser:
|
|||
if not _os.path.isfile(file_name):
|
||||
raise IOError("File not found: " + file_name)
|
||||
|
||||
if not file_name.endswith('.capnp'):
|
||||
raise ValueError("File does not end with .capnp, {}".format(file_name))
|
||||
|
||||
if display_name is None:
|
||||
display_name = _os.path.basename(file_name)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue