Skip to content

Commit 202d112

Browse files
committed
Added handling for a decoding exception during submission processing.
- Legacy-Id: 17151
1 parent 0fe23c3 commit 202d112

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ietf/submit/parsers/plain_parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def parse_name(self):
4444
if self.parsed_info.charset in ['us-ascii', 'utf-8']:
4545
while limit:
4646
limit -= 1
47-
line = self.fd.readline().decode(self.parsed_info.charset)
47+
try:
48+
line = self.fd.readline().decode(self.parsed_info.charset)
49+
except UnicodeDecodeError:
50+
return
4851
match = draftre.search(line)
4952
if not match:
5053
continue

0 commit comments

Comments
 (0)