From 8dcc613f0a3e19b861f5e1dc5a0c311bf1c515ba Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Fri, 3 Feb 2012 18:01:03 +0100 Subject: [PATCH] Don't use the VADDRESSBOOK tag anymore (closes #667) --- radicale/ical.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/radicale/ical.py b/radicale/ical.py index e440307..6d386eb 100644 --- a/radicale/ical.py +++ b/radicale/ical.py @@ -31,18 +31,15 @@ import uuid from contextlib import contextmanager -def serialize(tag, headers=(), items=(), whole=False): +def serialize(tag, headers=(), items=()): """Return a text corresponding to given collection ``tag``. The text may have the given ``headers`` and ``items`` added around the items if needed (ie. for calendars). - If ``whole`` is ``True``, the collection tags and headers are added, even - for address books. - """ - if tag == "VADDRESSBOOK" and not whole: - lines = [items[0].text] + if tag == "VADDRESSBOOK": + lines = [item.text for item in items] else: lines = ["BEGIN:%s" % tag] for part in (headers, items):