try except failsafe for ipo

This commit is contained in:
Justin 2023-03-08 15:47:31 +08:00 committed by GitHub
parent 3ae2e82d44
commit 3563daf9a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -314,6 +314,7 @@ def updateIpo(api_key, logf):
ipo_list = []
try:
if len(all_ipo['ipoCalendar']) > 0:
for ipo in all_ipo['ipoCalendar']:
try:
@ -336,6 +337,8 @@ def updateIpo(api_key, logf):
})
else:
ipo_list = ['No Data']
except:
ipo_list = ['No Data']
ipo_settings['symbols'] = ipo_list
f = open('csv/ipo_settings.json', 'w+')