From c76211bba8e0fa830e05215aeaa76e871c3a8d26 Mon Sep 17 00:00:00 2001 From: Henry Simons Date: Tue, 16 Mar 2021 13:40:03 +0000 Subject: [PATCH] ResponseException now breaks from loops --- gamestonk_terminal/sentiment/reddit_api.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gamestonk_terminal/sentiment/reddit_api.py b/gamestonk_terminal/sentiment/reddit_api.py index acb032041e6..286829972ae 100644 --- a/gamestonk_terminal/sentiment/reddit_api.py +++ b/gamestonk_terminal/sentiment/reddit_api.py @@ -124,7 +124,7 @@ def watchlist(l_args): print( "Received a response from Reddit with an authorization error. Check your token." ) - print("") + break if n_flair_posts_found: lt_watchlist_sorted = sorted( @@ -292,7 +292,7 @@ def popular_tickers(l_args): print( "Received a response from Reddit with an authorization error. Check your token." ) - print("") + break print(f" {n_tickers} potential tickers found.") @@ -455,7 +455,7 @@ def spac_community(l_args): print( "Received a response from Reddit with an authorization error. Check your token." ) - print("") + break if d_watchlist_tickers: lt_watchlist_sorted = sorted( @@ -602,7 +602,7 @@ def spac(l_args): print( "Received a response from Reddit with an authorization error. Check your token." ) - print("") + break if n_flair_posts_found: lt_watchlist_sorted = sorted( @@ -708,7 +708,7 @@ def wsb_community(l_args): print( "Received a response from Reddit with an authorization error. Check your token." ) - print("") + break except Exception as e: print(e) print("")