From f15d1089710721d5b0463eef42510eb93cef0f3c Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Wed, 15 Mar 2023 21:16:37 +0000 Subject: [PATCH] Catch all possible Reddit API exceptions --- apiserver/feeds/reddit.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apiserver/feeds/reddit.py b/apiserver/feeds/reddit.py index f173b61..6873e6b 100644 --- a/apiserver/feeds/reddit.py +++ b/apiserver/feeds/reddit.py @@ -32,10 +32,7 @@ def feed(): return [x.id for x in reddit.subreddit(subs).hot()] except KeyboardInterrupt: raise - except PRAWException as e: - logging.critical('Problem hitting reddit API: {}'.format(str(e))) - return [] - except PrawcoreException as e: + except BaseException as e: logging.critical('Problem hitting reddit API: {}'.format(str(e))) return []