Display names of problematic story JSON files

This commit is contained in:
Gnome Ann 2021-08-24 19:29:40 -04:00
parent cfb622b47f
commit cbdf3fa037

View File

@ -67,14 +67,14 @@ def getstoryfiles():
try: try:
js = json.load(f) js = json.load(f)
except: except:
print("Browser loading error: Story file is malformed or not a JSON file.") print(f"Browser loading error: {file} is malformed or not a JSON file.")
f.close() f.close()
continue continue
f.close() f.close()
try: try:
ob["actions"] = len(js["actions"]) ob["actions"] = len(js["actions"])
except TypeError: except TypeError:
print("Browser loading error: Story file has incorrect format.") print(f"Browser loading error: {file} has incorrect format.")
continue continue
list.append(ob) list.append(ob)
return list return list