« Return to Thread: Sending iMIP messages with no icon-pngs fails, possible fix

Sending iMIP messages with no icon-pngs fails, possible fix

by Markus Stürmer :: Rate this Message:

Reply to Author | View in Thread

I think I found a small bug in
        twistedcaldav/mail.py

When providing no icons,
        1114         iconPath = self.getIconPath(details, canceled,  
language=language)
will set iconPath to "None" and
        1280         if os.path.exists(iconPath) and htmlTemplate.find("cid:%
(iconName)s") != -1:
will fail with such an error message:
2009-04-17 14:23:27+0200 [-] [mailgateway] exceptions.TypeError:  
coercing to Unicode: need string or buffer, NoneType found

I catched that case by extending the test:
1280         if iconPath != None and os.path.exists(iconPath) and  
htmlTemplate.find("cid:%(iconName)s") != -1:

Regards,
Markus
_______________________________________________
calendarserver-users mailing list
calendarserver-users@...
http://lists.macosforge.org/mailman/listinfo.cgi/calendarserver-users

 « Return to Thread: Sending iMIP messages with no icon-pngs fails, possible fix