From 581d83dbf0de4d957fd642b1c5cd7c18bdab45b1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 14 May 2016 19:54:34 +0100 Subject: [PATCH] debian_linux.utils._read_rfc822: Parse and ignore comments --- debian/lib/python/debian_linux/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/lib/python/debian_linux/utils.py b/debian/lib/python/debian_linux/utils.py index f2fb6c39c..5d6a7d473 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