abort program execution on not enough space exception

This commit is contained in:
David Kilias 2020-03-14 13:29:02 +01:00
parent 44138e941b
commit c9ff14d013

View file

@ -70,7 +70,12 @@ def main(*_args):
else:
member_struct = json.load(open('example.json', 'r'))
app = FormApp(member_struct)
try:
app.run()
except Exception as e:
print(e)
return 0
new_data = {}
new_data['stammdaten'] = dict(zip(app.sd2.keys(), map(lambda f: f.value, app.sd2.values())))
new_data['finanzdaten'] = dict(zip(app.fin2.keys(), map(lambda f: f.value, app.fin2.values())))