|
@@ -27,8 +27,8 @@ class CryspCalendar:
|
|
self.practice_talks.update(self.parse_practice_talks(half_practices,
|
|
self.practice_talks.update(self.parse_practice_talks(half_practices,
|
|
half=True))
|
|
half=True))
|
|
self.notes = self.parse_notes(notes)
|
|
self.notes = self.parse_notes(notes)
|
|
- self.notes.update(self.parse_notes(practice_talks))
|
|
|
|
- self.notes.update(self.parse_notes(half_practices))
|
|
|
|
|
|
+ self.notes.update(self.parse_notes(map(lambda l:l[1:], practice_talks)))
|
|
|
|
+ self.notes.update(self.parse_notes(map(lambda l:l[1:], half_practices)))
|
|
self.verify_constraints()
|
|
self.verify_constraints()
|
|
self.no_repeat = no_repeat
|
|
self.no_repeat = no_repeat
|
|
|
|
|
|
@@ -86,11 +86,11 @@ class CryspCalendar:
|
|
def parse_notes(self, notes):
|
|
def parse_notes(self, notes):
|
|
notes_dict = {}
|
|
notes_dict = {}
|
|
for note in notes:
|
|
for note in notes:
|
|
- day = str_to_date(note[1])
|
|
|
|
- message = note[2]
|
|
|
|
|
|
+ day = str_to_date(note[0])
|
|
|
|
+ message = note[1]
|
|
assert day not in notes_dict or notes_dict[day] == message,\
|
|
assert day not in notes_dict or notes_dict[day] == message,\
|
|
'conflicting notes: "%s" and "%s" on %s' %\
|
|
'conflicting notes: "%s" and "%s" on %s' %\
|
|
- (notes_dict[day], message, note[1])
|
|
|
|
|
|
+ (notes_dict[day], message, note[0])
|
|
notes_dict[day] = message
|
|
notes_dict[day] = message
|
|
return notes_dict
|
|
return notes_dict
|
|
|
|
|