to_ical API also for ContentLines

pull/26/head
Johannes Raggam 2012-01-12 16:06:09 +01:00
rodzic acd7f1d534
commit 586581f2f7
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -418,7 +418,7 @@ class Component(CaselessDict):
def to_ical(self):
return str(self.content_lines())
return self.content_lines().to_ical()

Wyświetl plik

@ -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'