try and except for time_img (upcoming games)
This commit is contained in:
parent
d548c8b8a8
commit
4f7718e53b
@ -3053,9 +3053,12 @@ class StockTicker():
|
||||
x_offset += away_logo.size[0] + 4
|
||||
|
||||
if time == 'future':
|
||||
start_time = match['time']
|
||||
try:
|
||||
start_time = match['time']
|
||||
#img.paste(date_timage, (x_offset+5, 0))
|
||||
time_img = self.textImage(start_time, small_font, r=255,g=255,b=255)
|
||||
time_img = self.textImage(start_time, small_font, r=255,g=255,b=255)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
h_colour = mcolors.to_rgb(sports_info[strHomeTeam]['colour'].replace(' ', ''))
|
||||
except:
|
||||
@ -3078,7 +3081,10 @@ class StockTicker():
|
||||
|
||||
main_offset = 5 + x_offset + int(max(vs_size, date_timage.size[0])/2)
|
||||
|
||||
img.paste(time_img, (main_offset - int(time_img.size[0]/2), 26))
|
||||
try:
|
||||
img.paste(time_img, (main_offset - int(time_img.size[0]/2), 26))
|
||||
except:
|
||||
pass
|
||||
img.paste(date_timage, (main_offset - int(date_timage.size[0]/2), 0))
|
||||
img.paste(vs_timage, (main_offset - int(vs_timage.size[0]/2),9))
|
||||
img.paste(ac_timage, (main_offset - int(vs_timage.size[0]/2) - ac_timage.size[0], 9))
|
||||
|
Loading…
Reference in New Issue
Block a user