if not filename.endswith("metadata.json"):
raise IOException("Metadata file ["+filename+"] does not seem to be valid!")
data = json.load(fopen(filename,"r"))
if sys.version_info[0] == 2:
items = data.iteritems()
else:
items = data.items()
After Change
raise IOException("Metadata file ["+filename+"] not found!")
if not filename.endswith("metadata.json"):
raise IOException("Metadata file ["+filename+"] does not seem to be valid!")
with fopen(filename,"r") as f:
data = json.load(f)
if sys.version_info[0] == 2:
items = data.iteritems()
else:
items = data.items()