# HG changeset patch # User Teemu Piippo # Date 1561240521 -10800 # Node ID c73432653fd950775fafa1dd3017ccd6f83c2e18 # Parent 3ec747dfbfb928d5addf3856ae4f6f5917aaa46e fixed choking on 'Author: [PTAdmin]'-lines diff -r 3ec747dfbfb9 -r c73432653fd9 header.py --- a/header.py Sun Jun 23 00:50:22 2019 +0300 +++ b/header.py Sun Jun 23 00:55:21 2019 +0300 @@ -104,7 +104,9 @@ self.skip_to_next() result.name = self.parse_pattern(r'^Name: (.+)$', 'name')[0] self.skip_to_next() - result.author, result.username = self.parse_pattern(r'^Author: ([^ \[]*[^\[]+) (?:\[([^\]]+)\])?', 'author') + result.author, result.username = self.parse_pattern(r'^Author: (?:([^ \[]*[^\[]+) )?(?:\[([^\]]+)\])?', 'author') + if not result.author and not result.username: + self.parse_error('author line does not contain a name nor username') for header_entry in self.get_more_header_stuff(): if self.try_to_match( r'^!LDRAW_ORG ' \