try except
This commit is contained in:
parent
f606ebf886
commit
4c00f3635e
@ -1141,8 +1141,12 @@ class StockTicker():
|
||||
point_change = False
|
||||
|
||||
if names:
|
||||
ticker = coin_info[cb]['name'].upper()
|
||||
midFrame = self.textToImage(ticker, current, arrow, percent_change, point_change) #IMAGE THE TEXT
|
||||
try:
|
||||
ticker = coin_info[cb]['name'].upper()
|
||||
midFrame = self.textToImage(ticker, current, arrow, percent_change, point_change) #IMAGE THE TEXT
|
||||
except:
|
||||
ticker, base = cb.split(',')
|
||||
midFrame = self.textToImage(ticker + '(' + base + ')', current, arrow, percent_change, point_change) #IMAGE THE TEXT
|
||||
else:
|
||||
midFrame = self.textToImage(ticker + '(' + base + ')', current, arrow, percent_change, point_change) #IMAGE THE TEXT
|
||||
|
||||
@ -2117,7 +2121,10 @@ class StockTicker():
|
||||
|
||||
change = float(info['change']) #TEXT
|
||||
if names:
|
||||
ticker = info['name'].upper() #TEXT
|
||||
try:
|
||||
ticker = info['name'].upper() #TEXT
|
||||
except:
|
||||
ticker = symbol
|
||||
else:
|
||||
ticker = symbol
|
||||
|
||||
@ -6750,7 +6757,10 @@ class StockTicker():
|
||||
info = active_info[symbol]
|
||||
change = float(info['change']) #TEXT
|
||||
if names:
|
||||
ticker = info['name'].upper() #TEXT
|
||||
try:
|
||||
ticker = info['name'].upper() #TEXT
|
||||
except:
|
||||
ticker = symbol
|
||||
else:
|
||||
ticker = symbol
|
||||
arrow, change = self.getArrow(change)
|
||||
@ -6819,7 +6829,10 @@ class StockTicker():
|
||||
info = gainers_info[symbol]
|
||||
change = float(info['change']) #TEXT
|
||||
if names:
|
||||
ticker = info['name'] #TEXT
|
||||
try:
|
||||
ticker = info['name'] #TEXT
|
||||
except:
|
||||
ticker = symbol
|
||||
else:
|
||||
ticker = symbol
|
||||
arrow, change = self.getArrow(change)
|
||||
@ -6888,7 +6901,10 @@ class StockTicker():
|
||||
info = losers_info[symbol]
|
||||
change = float(info['change']) #TEXT
|
||||
if names:
|
||||
ticker = info['name']
|
||||
try:
|
||||
ticker = info['name']
|
||||
except:
|
||||
ticker = symbol
|
||||
else:
|
||||
ticker = symbol #TEXT
|
||||
arrow, change = self.getArrow(change)
|
||||
|
Loading…
Reference in New Issue
Block a user