Improve error handling in update.py
This commit is contained in:
16
update.py
16
update.py
@@ -106,12 +106,16 @@ def run_scripts(summary: GitHubStepSummary, product_filter: str) -> bool:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
with GitHubGroup(product.name):
|
with GitHubGroup(product.name):
|
||||||
__delete_data(product)
|
try:
|
||||||
for config in product.auto_configs():
|
__delete_data(product)
|
||||||
success = __run_script(product, config, exec_summary)
|
for config in product.auto_configs():
|
||||||
if not success:
|
success = __run_script(product, config, exec_summary)
|
||||||
__revert_data(product)
|
if not success:
|
||||||
break # stop running scripts for this product
|
__revert_data(product)
|
||||||
|
break # stop running scripts for this product
|
||||||
|
|
||||||
|
except BaseException:
|
||||||
|
logging.exception(f"Skipping {product.name}, there was an error while running its scripts")
|
||||||
|
|
||||||
exec_summary.print_summary(summary)
|
exec_summary.print_summary(summary)
|
||||||
return exec_summary.any_failure()
|
return exec_summary.any_failure()
|
||||||
|
|||||||
Reference in New Issue
Block a user