Add more validation for model meta

This commit is contained in:
ines 2017-08-29 11:21:44 +02:00
parent 2e28982e28
commit 173089a45a
1 changed files with 2 additions and 2 deletions

View File

@ -169,8 +169,8 @@ def get_model_meta(path):
raise IOError("Could not read meta.json from %s" % meta_path)
meta = read_json(meta_path)
for setting in ['lang', 'name', 'version']:
if setting not in meta:
raise ValueError('No %s setting found in model meta.json' % setting)
if setting not in meta or not meta[setting]:
raise ValueError('No valid '%s' setting found in model meta.json' % setting)
return meta