From fe293edfae1e4ff6ca1556065aaed2601bc0755c Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 30 Mar 2023 13:15:43 +0800 Subject: [PATCH] Update stockTicker.py --- stockTicker.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/stockTicker.py b/stockTicker.py index 4d70d6c..b634da4 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -1861,13 +1861,16 @@ class StockTicker(): except: pass - if all_stocks_settings['prepost']: - try: - f = open('csv/prepost_settings.json', 'r') - prepost_settings = json.load(f) - f.close() - except: - pass + try: + if all_stocks_settings['prepost']: + try: + f = open('csv/prepost_settings.json', 'r') + prepost_settings = json.load(f) + f.close() + except: + pass + except: + pass stock_info = all_stocks_settings['symbols'] symbols = list(stock_info.keys())