[CalendarServer-changes] [12040] CalendarServer/trunk/txdav/common/datastore/sql.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:20:04 PDT 2014


Revision: 12040
          http://trac.calendarserver.org//changeset/12040
Author:   cdaboo at apple.com
Date:     2013-12-06 12:40:44 -0800 (Fri, 06 Dec 2013)
Log Message:
-----------
Fix unit test failure with older versions of python.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/common/datastore/sql.py

Modified: CalendarServer/trunk/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql.py	2013-12-06 00:03:28 UTC (rev 12039)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py	2013-12-06 20:40:44 UTC (rev 12040)
@@ -5597,6 +5597,8 @@
                 child._notificationType = json.loads(child._notificationType)
             except ValueError:
                 pass
+            if isinstance(child._notificationType, unicode):
+                child._notificationType = child._notificationType.encode("utf-8")
             child._loadPropertyStore(
                 props=propertyStores.get(child._resourceID, None)
             )
@@ -5645,6 +5647,8 @@
                 self._notificationType = json.loads(self._notificationType)
             except ValueError:
                 pass
+            if isinstance(self._notificationType, unicode):
+                self._notificationType = self._notificationType.encode("utf-8")
             self._loadPropertyStore()
             returnValue(self)
         else:
@@ -5758,6 +5762,8 @@
                 self._notificationData = json.loads(self._notificationData)
             except ValueError:
                 pass
+            if isinstance(self._notificationData, unicode):
+                self._notificationData = self._notificationData.encode("utf-8")
         returnValue(self._notificationData)
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/4be05e57/attachment.html>


More information about the calendarserver-changes mailing list