aboutsummaryrefslogtreecommitdiffstats
path: root/debian/lib/python/debian_linux/utils.py
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2016-05-14 19:54:34 +0100
committerBen Hutchings <ben@decadent.org.uk>2016-05-14 19:54:34 +0100
commit581d83dbf0de4d957fd642b1c5cd7c18bdab45b1 (patch)
tree9becb7cba92ef96944b36e5560bdd8480daf8935 /debian/lib/python/debian_linux/utils.py
parent5917a891aa51ee88e41f1f77638220a6040c0599 (diff)
downloadkernel_replicant_linux-581d83dbf0de4d957fd642b1c5cd7c18bdab45b1.tar.gz
kernel_replicant_linux-581d83dbf0de4d957fd642b1c5cd7c18bdab45b1.tar.bz2
kernel_replicant_linux-581d83dbf0de4d957fd642b1c5cd7c18bdab45b1.zip
debian_linux.utils._read_rfc822: Parse and ignore comments
Diffstat (limited to 'debian/lib/python/debian_linux/utils.py')
-rw-r--r--debian/lib/python/debian_linux/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/debian/lib/python/debian_linux/utils.py b/debian/lib/python/debian_linux/utils.py
index f2fb6c39cd69..5d6a7d473066 100644
--- a/debian/lib/python/debian_linux/utils.py
+++ b/debian/lib/python/debian_linux/utils.py
@@ -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