Переглянути джерело

Clearer message for broadcast

Foppe Hemminga 6 роки тому
батько
коміт
6ebc1334d8
1 змінених файлів з 6 додано та 3 видалено
  1. 6 3
      main.py

+ 6 - 3
main.py

@@ -1,6 +1,6 @@
 import psycopg2.extras
 import model
-#from pprint import pprint
+# from pprint import pprint
 import time
 import database
 import sys
@@ -68,8 +68,11 @@ if __name__ == '__main__':
                     found_in_database = True
             if not found_in_database:
                 # report new scratching
-                message = 'New scratching: {} {} race {} horse {}'.format(scratching.date, scratching.venue,
-                                                                          scratching.race, scratching.horse)
+                message = 'New scratching: date = {} venue = {}-{} race = {} horse = {}'.format(scratching.date,
+                                                                                                scratching.state,
+                                                                                                scratching.venue,
+                                                                                                scratching.race,
+                                                                                                scratching.horse)
                 print(message)
                 view.broadcast(message)
                 # store new scratching