Added error catching when exporting
This commit is contained in:
parent
d53b457345
commit
19f8115c4a
1 changed files with 11 additions and 2 deletions
|
@ -13,9 +13,18 @@ def cli(sections):
|
|||
for func in temp_functions:
|
||||
if func.__name__ in sections:
|
||||
functions.append(func)
|
||||
errors = []
|
||||
for func in functions:
|
||||
try:
|
||||
repos.go_to_data() # Reset data directory
|
||||
func()
|
||||
except Exception as e:
|
||||
errors.append(e)
|
||||
|
||||
if errors:
|
||||
print("Errors:")
|
||||
for error in errors:
|
||||
print(error)
|
||||
return 0
|
||||
|
||||
|
||||
|
|
Reference in a new issue