mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Handle headers other than PRODID and VERSION (fix #250)
This commit is contained in:
parent
f2fc02501c
commit
6e715912f6
1 changed files with 5 additions and 6 deletions
|
@ -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(("BEGIN:", "END:")):
|
||||||
if line.startswith("%s:" % header):
|
break
|
||||||
header_lines.append(Header(line))
|
header_lines.append(Header(line))
|
||||||
break
|
|
||||||
|
|
||||||
return header_lines
|
return header_lines
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue