debian_linux.utils._read_rfc822: Parse and ignore comments

This commit is contained in:
Ben Hutchings 2016-05-14 19:54:34 +01:00
parent 5917a891aa
commit 581d83dbf0
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ def _read_rfc822(f, cls):
if not line:
eof = True
break
# Strip comments rather than trying to preserve them
if line[0] == '#':
continue
line = line.strip('\n')
if not line:
break