1
Fork 0

Added error catching when exporting

This commit is contained in:
Jake Howard 2015-12-07 18:22:15 +00:00
parent d53b457345
commit 19f8115c4a

View file

@ -13,9 +13,18 @@ def cli(sections):
for func in temp_functions: for func in temp_functions:
if func.__name__ in sections: if func.__name__ in sections:
functions.append(func) functions.append(func)
errors = []
for func in functions: for func in functions:
try:
repos.go_to_data() # Reset data directory repos.go_to_data() # Reset data directory
func() func()
except Exception as e:
errors.append(e)
if errors:
print("Errors:")
for error in errors:
print(error)
return 0 return 0