瀏覽代碼

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