From 586581f2f7b7c70810135c56e6bbed1c0bf98ea8 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Thu, 12 Jan 2012 16:06:09 +0100 Subject: [PATCH] to_ical API also for ContentLines --- src/icalendar/cal.py | 2 +- src/icalendar/parser.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/icalendar/cal.py b/src/icalendar/cal.py index 6547289..26442c1 100644 --- a/src/icalendar/cal.py +++ b/src/icalendar/cal.py @@ -418,7 +418,7 @@ class Component(CaselessDict): def to_ical(self): - return str(self.content_lines()) + return self.content_lines().to_ical() diff --git a/src/icalendar/parser.py b/src/icalendar/parser.py index c2e1369..155dc83 100644 --- a/src/icalendar/parser.py +++ b/src/icalendar/parser.py @@ -286,7 +286,7 @@ class Contentline(str): '123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234\\r\\n 56789 123456789 123456789' A folded line gets unfolded - >>> c = Contentline.from_ical(str(c)) + >>> c = Contentline.from_ical(c.to_ical()) >>> c '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'