Handle headers other than PRODID and VERSION (fix #250)

This commit is contained in:
Guillaume Ayoub 2015-01-05 12:32:22 +01:00
parent f2fc02501c
commit 6e715912f6

View File

@ -464,12 +464,11 @@ class Collection(object):
"""Find headers items in collection.""" """Find headers items in collection."""
header_lines = [] header_lines = []
lines = unfold(self.text) lines = unfold(self.text)[1:]
for header in ("PRODID", "VERSION"):
for line in lines: for line in lines:
if line.startswith("%s:" % header): if line.startswith(("BEGIN:", "END:")):
header_lines.append(Header(line))
break break
header_lines.append(Header(line))
return header_lines return header_lines