From 19f8115c4a255d30991de24b9a5a0d8c60b111ae Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 7 Dec 2015 18:22:15 +0000 Subject: [PATCH] Added error catching when exporting --- project/export/cli.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/project/export/cli.py b/project/export/cli.py index a5fbf9a..356d6b4 100644 --- a/project/export/cli.py +++ b/project/export/cli.py @@ -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: - repos.go_to_data() # Reset data directory - func() + 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