|
@@ -63,10 +63,11 @@ if __name__ == '__main__':
|
|
|
int(scratching.race) == int(row.race) and
|
|
int(scratching.race) == int(row.race) and
|
|
|
scratching.horse == row.horse
|
|
scratching.horse == row.horse
|
|
|
):
|
|
):
|
|
|
- message = 'Horse found: date = {}, venue = {}, race = {}, horse = {}'.format(scratching.date,
|
|
|
|
|
- scratching.venue,
|
|
|
|
|
- scratching.race,
|
|
|
|
|
- scratching.horse)
|
|
|
|
|
|
|
+ message_string = 'Horse found: date = {}, venue = {}, race = {}, horse = {}'
|
|
|
|
|
+ message = message_string.format(scratching.date,
|
|
|
|
|
+ scratching.venue,
|
|
|
|
|
+ scratching.race,
|
|
|
|
|
+ scratching.horse)
|
|
|
# print(message)
|
|
# print(message)
|
|
|
# print(row)
|
|
# print(row)
|
|
|
found_in_database = True
|
|
found_in_database = True
|
|
@@ -82,14 +83,15 @@ if __name__ == '__main__':
|
|
|
"""
|
|
"""
|
|
|
cursor.execute(query, (scratching.date, scratching.venue, scratching.race))
|
|
cursor.execute(query, (scratching.date, scratching.venue, scratching.race))
|
|
|
db_data = cursor.fetchone()
|
|
db_data = cursor.fetchone()
|
|
|
- message = 'venue = {} {} {}-{} | race = {} starts at {} | {} UTC | horse = {}'.format(day_abbr,
|
|
|
|
|
- scratching.date,
|
|
|
|
|
- scratching.state,
|
|
|
|
|
- scratching.venue,
|
|
|
|
|
- scratching.race,
|
|
|
|
|
- db_data.start_time,
|
|
|
|
|
- db_data.utctime,
|
|
|
|
|
- scratching.horse)
|
|
|
|
|
|
|
+ message_string = 'venue = {} {} {}-{} | race = {} starts at {} | {} UTC | horse = {}'
|
|
|
|
|
+ message = message_string.format(day_abbr,
|
|
|
|
|
+ scratching.date,
|
|
|
|
|
+ scratching.state,
|
|
|
|
|
+ scratching.venue,
|
|
|
|
|
+ scratching.race,
|
|
|
|
|
+ db_data.start_time,
|
|
|
|
|
+ db_data.utctime,
|
|
|
|
|
+ scratching.horse)
|
|
|
print(message)
|
|
print(message)
|
|
|
if broadcast:
|
|
if broadcast:
|
|
|
view.broadcast(message)
|
|
view.broadcast(message)
|