refactor-datamodel #10

Merged
tux merged 10 commits from refactor-datamodel into master 2020-03-14 23:08:56 +01:00
Showing only changes of commit d3531342f3 - Show all commits

View file

@ -52,7 +52,13 @@ def main(*_args):
else:
member_struct = json.load(open('example.json', 'r'))
app = FormApp(member_struct)
app.run()
try:
app.run()
except Exception as e:
print(e)
return 0
if app.data_has_changed():
out_data = app.get_data_from_form()
outfile_name = app.get_filename()
@ -61,7 +67,7 @@ def main(*_args):
json.dump(out_data, outfile, sort_keys=True, indent=4)
else:
print("Nothing has changed, skipping writing file")
if __name__ == "__main__":
npyscreen.wrapper_basic(main)