Commit eaff9fe9 authored by Michal Čihař's avatar Michal Čihař

Refuse to load file which looks invalid

parent b269ad19
......@@ -323,6 +323,9 @@ class FileFormat(object):
self.storefile = storefile
# Load store
self.store = self.load(storefile)
# Check store validity
if not self.is_valid(self.store):
raise ValueError('Invalid file format')
# Remember template
self.template_store = template_store
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment