Merge pull request #93 from dirtbags/v3.3_hotfix

Fixing handling of multiple authors
This commit is contained in:
int00h5525 2019-11-07 10:01:15 -06:00 committed by GitHub
commit 997c6d4287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
3.3.1 3.3.2

View File

@ -174,6 +174,10 @@ class Puzzle:
def handle_header_key(self, key, val): def handle_header_key(self, key, val):
if key == 'author': if key == 'author':
self.authors.append(val) 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': elif key == 'summary':
self.summary = val self.summary = val
elif key == 'answer': elif key == 'answer':