Commit 1fbd45fa authored by Mathieu Giraud's avatar Mathieu Giraud

tools/defs.py, tools/utils.py: bump .json version to 2016a, warning for older files

parent 3348cbbd
VIDJIL_JSON_VERSION = "2014.10"
VIDJIL_JSON_VERSION_REQUIRED = "2014.10"
VIDJIL_JSON_VERSION = "2016a"
import collections
import defs
import sys
#### Utilities on dictionaries
......@@ -203,7 +204,9 @@ class VidjilJson():
def check_version(self, filepath):
'''Check vidjil_json_version'''
if "vidjil_json_version" in self.d:
if self.d["vidjil_json_version"] >= defs.VIDJIL_JSON_VERSION:
if self.d["vidjil_json_version"] < defs.VIDJIL_JSON_VERSION:
sys.stderr.write("! Reading file with old .json version %s\n" % self.d["vidjil_json_version"])
if self.d["vidjil_json_version"] >= defs.VIDJIL_JSON_VERSION_REQUIRED:
return
raise IOError ("File '%s' is too old -- please regenerate it with a newer version of Vidjil" % filepath)
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