Преглед на файлове

Add state to Scratching namedTuple

Foppe Hemminga преди 6 години
родител
ревизия
f7dc165fba
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      _bs.py

+ 2 - 2
_bs.py

@@ -19,7 +19,7 @@ RaceDayShort = collections.namedtuple('RaceDayShort', Venue._fields + ('date_str
 RaceDay = collections.namedtuple('RaceDay', RaceDayShort._fields + (
     'scratchings_latest_datetime', 'scratchings_latest_unixtime',
     'scratchings_close_datetime', 'scratchings_close_unixtime'))
-Scratching = collections.namedtuple('Scratching', 'venue date race horse')
+Scratching = collections.namedtuple('Scratching', 'venue state date race horse')
 
 
 def get_today_row(this_text, this_row):
@@ -162,7 +162,7 @@ def process_scratchings(this_data, this_venue):
                 print('First character in line: {}'.format(text[0]))
                 print('The start of the offending line is: {}'.format(text[0:10]))
                 continue
-            temp_list = Scratching(this_venue.name, this_venue.date, race, text)
+            temp_list = Scratching(this_venue.name, this_venue.state, this_venue.date, race, text)
             scratchings.append(temp_list)
     assert len(scratchings) == int(scratchings_count), 'len(scratchings) {} == scratchings_count {}'.format(
         len(scratchings), scratchings_count)