Adding capnp extension validation check

- To catch odd import problems on Windows
This commit is contained in:
Jacob Alexander 2019-10-18 12:25:04 -07:00
parent 964f514180
commit 62eccff150
Failed to generate hash of commit

View file

@ -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)