sports spacing fix

This commit is contained in:
Neythen Treloar 2022-03-05 10:58:43 +00:00
parent c99bc0f563
commit 32f8f6ab45
2 changed files with 11 additions and 7 deletions

View File

@ -422,7 +422,7 @@ def updateLeagueTables(api_key):
print(all_settings['leagues'].keys()) print(all_settings['leagues'].keys())
json.dump(all_settings, open( "csv/league_tables.json".format(league), 'w+' )) json.dump(all_settings, open( "csv/league_tables.json".format(league), 'w+' ))
except Exception as e: except Exception as e:
raise e
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
logf.write(str(e)) logf.write(str(e))

View File

@ -1688,7 +1688,7 @@ class StockTicker():
img = img.crop((0,0,x_offset ,32)) img = img.crop((0,0,x_offset ,32))
imgs.append(img) imgs.append(img)
except Exception as e: except Exception as e:
raise e
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
self.logf.write(str(e)) self.logf.write(str(e))
@ -1776,14 +1776,18 @@ class StockTicker():
#img.paste(points_timage, (x_offset, 14)) #img.paste(points_timage, (x_offset, 14))
img.paste(standing_timage, (x_offset, 22)) img.paste(standing_timage, (x_offset, 22))
#x_offset += max(points_timage.size[0], standing_timage.size[0]) + buff_size
x_offset += standing_timage.size[0] + buff_size x_offset += standing_timage.size[0]
if name_timage.size[0] > max( wins_timage.size[0], loss_timage.size[0], draw_timage.size[0]) + standing_timage.size[0]:
x_offset += name_timage.size[0] - (max( wins_timage.size[0], loss_timage.size[0], draw_timage.size[0]) + standing_timage.size[0])
x_offset += buff_size
img = img.crop((0,0,x_offset ,32)) img = img.crop((0,0,x_offset ,32))
imgs.append(img) imgs.append(img)
except Exception as e: except Exception as e:
raise e
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
self.logf.write(str(e)) self.logf.write(str(e))
@ -2752,7 +2756,7 @@ if __name__ == '__main__':
#stock_ticker.process_msg('-') #stock_ticker.process_msg('-')
#stock_ticker.process_msg('W') #stock_ticker.process_msg('W')
#stock_ticker.process_msg('A') stock_ticker.process_msg('A')
@ -2760,7 +2764,7 @@ if __name__ == '__main__':
msg = getInput() msg = getInput()
stock_ticker.process_msg(msg) stock_ticker.process_msg(msg)
except Exception as e: except Exception as e:
raise e
exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
log.write(str(e)) log.write(str(e))