From 05aea04cf5b4c9128cc12ebc6f949c20c9b8f9f7 Mon Sep 17 00:00:00 2001 From: Mark Eaton Date: Fri, 20 Feb 2026 17:59:05 -0500 Subject: [PATCH] simplify error handling --- get_saint_of_the_day.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/get_saint_of_the_day.py b/get_saint_of_the_day.py index 24be33d..55c036a 100644 --- a/get_saint_of_the_day.py +++ b/get_saint_of_the_day.py @@ -196,7 +196,6 @@ def main(): print("No saint's day today (or today is a holiday/feast day).") return - post_errors = [] for saint in saints: print(f"Saint: {saint['name']}") @@ -219,14 +218,9 @@ def main(): print(f" Posted! URL: {status['url']}") except Exception as e: print(f" Error posting: {e}") - post_errors.append(str(e)) - + raise print() - if post_errors: - print(f"{len(post_errors)} post(s) failed", file=sys.stderr) - sys.exit(1) - if __name__ == "__main__": main()