From 857e7318b4b3353fabb355069a47b5b30f00620d Mon Sep 17 00:00:00 2001 From: Jacob Date: Sun, 7 Sep 2025 12:57:52 -0500 Subject: [PATCH] Clean up error handling and unnecessary non-flask runner code --- main.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/main.py b/main.py index 1391c54..aaa84a1 100644 --- a/main.py +++ b/main.py @@ -23,6 +23,7 @@ def stats(): return Response("Internal Server Error", 500) except Exception as e: app.logger.exception(e) + return "Internal Server Error", 500 return {} @@ -51,11 +52,3 @@ def api(subpath): # TODO check that the subpath contains no more than 3 unique subpath strings hits = r.incr(f"hits:{subpath}") return {"hits": hits} - - -def main(): - app.run() - - -if __name__ == "__main__": - main() -- 2.30.2