[CalendarServer-changes] [4038] CalendarServer/trunk/twistedcaldav/mail.py

source_changes at macosforge.org source_changes at macosforge.org
Sat Apr 18 13:17:50 PDT 2009


Revision: 4038
          http://trac.macosforge.org/projects/calendarserver/changeset/4038
Author:   sagen at apple.com
Date:     2009-04-18 13:17:49 -0700 (Sat, 18 Apr 2009)
Log Message:
-----------
Fixes the situation where email invites wouldn't get sent if the icon file could not be found.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/mail.py

Modified: CalendarServer/trunk/twistedcaldav/mail.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/mail.py	2009-04-18 17:43:48 UTC (rev 4037)
+++ CalendarServer/trunk/twistedcaldav/mail.py	2009-04-18 20:17:49 UTC (rev 4038)
@@ -1277,7 +1277,8 @@
         msgHtmlRelated.attach(msgHtml)
 
         # an image for html version
-        if os.path.exists(iconPath) and htmlTemplate.find("cid:%(iconName)s") != -1:
+        if (iconPath != None and os.path.exists(iconPath) and
+            htmlTemplate.find("cid:%(iconName)s") != -1):
 
             with open(iconPath) as iconFile:
                 msgIcon = MIMEImage(iconFile.read(),
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090418/a828ce5e/attachment.html>


More information about the calendarserver-changes mailing list