Long binary data would be base64 encoded with newlines, which made the iCalendar files incorrect. (This still needs testing).

pull/6/head
Lennart Regebro 2009-01-01 16:42:39 +00:00
rodzic 7029f35e67
commit 6f4b33ae83
2 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -1,3 +1,9 @@
iCalendar trunk (unreleased)
============================
* Long binary data would be base64 encoded with newlines, which made the
iCalendar files incorrect. (This still needs testing).
iCalendar 2.0.1 (2008-07-11)
============================

Wyświetl plik

@ -47,6 +47,7 @@ from types import IntType, StringType, UnicodeType, TupleType, ListType
SequenceTypes = [TupleType, ListType]
import re
import time as _time
import binascii
# from this package
from icalendar.caselessdict import CaselessDict
@ -91,7 +92,7 @@ class vBinary:
return "vBinary(%s)" % str.__repr__(self.obj)
def ical(self):
return self.obj.encode('base-64')[:-1]
return binascii.b2a_base64(self.obj)[:-1]
def from_ical(ical):
"Parses the data format from ical text format"