summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-02-24 19:50:56 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2014-02-24 19:59:53 +0100
commita5730c9eec6c25882e2e9b7a6ef1db28cfabf20b (patch)
treed43bc6ae4661d6708a4d681e372036ebc33698b6
parent87e2d218a0851fe2a87d167ee9a6ee7e2ff6c6d0 (diff)
downloadpykolab-a5730c9eec6c25882e2e9b7a6ef1db28cfabf20b.tar.gz
Pass attendee's cutype argument to object constructor; add method=XXX to iTip message part
-rw-r--r--pykolab/xml/event.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py
index 6d3669c..9145a45 100644
--- a/pykolab/xml/event.py
+++ b/pykolab/xml/event.py
@@ -45,7 +45,7 @@ class Event(object):
self.uid = self.get_uid()
def add_attendee(self, email, name=None, rsvp=False, role=None, participant_status=None, cutype="INDIVIDUAL"):
- attendee = Attendee(email, name, rsvp, role, participant_status)
+ attendee = Attendee(email, name, rsvp, role, participant_status, cutype)
self._attendees.append(attendee)
self.event.setAttendees(self._attendees)
@@ -667,7 +667,7 @@ class Event(object):
params = {}
if params.has_key('CN'):
- name = params['CN']
+ name = str(params['CN'])
else:
name = None
@@ -968,8 +968,8 @@ class Event(object):
msg.attach( MIMEText(text) )
- part = MIMEBase('text', "calendar")
- part.set_charset('UTF-8')
+ part = MIMEBase('text', 'calendar', charset='UTF-8', method=method)
+ del part['MIME-Version'] # mime parts don't need this
# TODO: Should allow for localization
msg["Subject"] = "Meeting Request %s" % (participant_status)
@@ -977,7 +977,7 @@ class Event(object):
part.set_payload(self.as_string_itip(method=method))
part.add_header('Content-Disposition', 'attachment; filename="event.ics"')
- part.replace_header('Content-Transfer-Encoding', '8bit')
+ part.add_header('Content-Transfer-Encoding', '8bit')
msg.attach(part)