Return an early error if we can't extract enough information from the draft to fill in the metainformation that lets the user return to this submission later. Tweak an error message.
- Legacy-Id: 3171
This commit is contained in:
parent
010e924e74
commit
d98d27dfa6
|
@ -59,10 +59,12 @@ class PlainParser(FileParser):
|
|||
match_revision = revisionre.match(filename)
|
||||
if match_revision:
|
||||
self.parsed_info.metadraft.revision = match_revision.group(1)
|
||||
else:
|
||||
self.parsed_info.add_error(u'The filename found on the first page of the document does not contain a revision: "%s"' % (filename,))
|
||||
filename = re.sub('-\d+$', '', filename)
|
||||
self.parsed_info.metadraft.filename = filename
|
||||
return
|
||||
self.parsed_info.add_error('The document does not contain a legitimate filename that start with draft-*')
|
||||
self.parsed_info.add_error('The first page of the document does not contain a legitimate filename that start with draft-*')
|
||||
|
||||
def parse_wg(self):
|
||||
filename = self.parsed_info.metadraft.filename
|
||||
|
|
Loading…
Reference in a new issue