Skip to content

Commit

Permalink
fix: Stop crashing when author element doesn't have a name (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
cabo authored Jun 21, 2022
1 parent 6b64f1c commit 8cecabe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xml2rfc/writers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,7 @@ def page_bottom_left(self):
authors = self.root.findall('front/author')
authors = [ a for a in authors if a.get('role') != 'contributor' ]
surnames = [ n for n in [ short_author_ascii_name_parts(a)[1] for a in authors ] if n ]
text = ''
if len(surnames) == 1:
text = surnames[0]
elif len(surnames) == 2:
Expand Down

0 comments on commit 8cecabe

Please sign in to comment.