[CalendarServer-changes] [7882] CalendarServer/branches/users/glyph/imip-and-admin-html/ twistedcaldav/mail.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 11 21:36:46 PDT 2011


Revision: 7882
          http://trac.macosforge.org/projects/calendarserver/changeset/7882
Author:   glyph at apple.com
Date:     2011-08-11 21:36:46 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
treat all text values consistently

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py

Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py	2011-08-12 04:36:35 UTC (rev 7881)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py	2011-08-12 04:36:46 UTC (rev 7882)
@@ -1337,21 +1337,14 @@
         results['month'] = dtStart.getMonth()
         results['day'] = dtStart.getDay()
 
-        summary = component.propertyValue("SUMMARY").decode("utf-8")
-        if summary is None:
-            summary = ""
-        results['summary'] = summary
+        for propertyToResult in ['summary', 'description', 'location']:
+            result = component.propertyValue(propertyToResult.upper())
+            if result is None:
+                result = u""
+            else:
+                result = result.decode('utf-8')
+            results[propertyToResult] = result
 
-        description = component.propertyValue("DESCRIPTION")
-        if description is None:
-            description = ""
-        results['description'] = description
-
-        location = component.propertyValue("LOCATION")
-        if location is None:
-            location = ""
-        results['location'] = location
-
         with translationTo(language) as trans:
             results['dateInfo'] = trans.date(component)
             results['timeInfo'], duration = trans.time(component)
@@ -1369,10 +1362,6 @@
 
 
 
-
-
-
-
 #
 # POP3
 #
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110811/4104f0f6/attachment-0001.html>


More information about the calendarserver-changes mailing list