Fixing handling of multiple authors

This commit is contained in:
John Donaldson 2019-11-07 15:59:22 +00:00
parent 535bddaa37
commit 0916c10bcc
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
3.3
3.3.2

View File

@ -174,6 +174,10 @@ class Puzzle:
def handle_header_key(self, key, val):
if key == 'author':
self.authors.append(val)
elif key == 'authors':
if not isinstance(val, list):
raise ValueError("Authors must be a list, got %s, instead" & (type(val),))
self.authors = list(val)
elif key == 'summary':
self.summary = val
elif key == 'answer':