[CalendarServer-changes] [15505] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Apr 11 14:09:14 PDT 2016
Revision: 15505
http://trac.calendarserver.org//changeset/15505
Author: cdaboo at apple.com
Date: 2016-04-11 14:09:14 -0700 (Mon, 11 Apr 2016)
Log Message:
-----------
Fix for CS:pushtoken PROPFIND on a cross-pod shared calendar.
Modified Paths:
--------------
CalendarServer/trunk/requirements-dev.txt
CalendarServer/trunk/txdav/caldav/datastore/test/common.py
CalendarServer/trunk/txdav/common/datastore/file.py
CalendarServer/trunk/txdav/common/datastore/sql.py
CalendarServer/trunk/txdav/common/datastore/sql_notification.py
Modified: CalendarServer/trunk/requirements-dev.txt
===================================================================
--- CalendarServer/trunk/requirements-dev.txt 2016-04-11 21:07:53 UTC (rev 15504)
+++ CalendarServer/trunk/requirements-dev.txt 2016-04-11 21:09:14 UTC (rev 15505)
@@ -5,4 +5,4 @@
q
tl.eggdeps
--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVClientLibrary/trunk@15425#egg=CalDAVClientLibrary
---editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@15495#egg=CalDAVTester
+--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@15504#egg=CalDAVTester
Modified: CalendarServer/trunk/txdav/caldav/datastore/test/common.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/test/common.py 2016-04-11 21:07:53 UTC (rev 15504)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/common.py 2016-04-11 21:09:14 UTC (rev 15505)
@@ -992,6 +992,18 @@
@inlineCallbacks
+ def test_calendar_missingNotifier(self):
+ """
+ L{ICalendarHomeChild.getNotifier} returns L{None} when no notifiers exist
+ """
+ home = yield self.homeUnderTest()
+ home._notifiers = {}
+ calendar = yield home.calendarWithName("calendar_1")
+ result = calendar.getNotifier("push")
+ self.assertTrue(result is None)
+
+
+ @inlineCallbacks
def test_hasCalendarResourceUIDSomewhereElse(self):
"""
L{ICalendarHome.hasCalendarResourceUIDSomewhereElse} will determine if
Modified: CalendarServer/trunk/txdav/common/datastore/file.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/file.py 2016-04-11 21:07:53 UTC (rev 15504)
+++ CalendarServer/trunk/txdav/common/datastore/file.py 2016-04-11 21:09:14 UTC (rev 15505)
@@ -1315,7 +1315,7 @@
def getNotifier(self, factory_name):
- return self._notifiers.get(factory_name)
+ return self._notifiers.get(factory_name) if self._notifiers else None
def notifierID(self):
Modified: CalendarServer/trunk/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql.py 2016-04-11 21:07:53 UTC (rev 15504)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py 2016-04-11 21:09:14 UTC (rev 15505)
@@ -2929,7 +2929,7 @@
def getNotifier(self, factory_name):
- return self._notifiers.get(factory_name)
+ return self._notifiers.get(factory_name) if self._notifiers else None
def notifierID(self):
@@ -4443,7 +4443,7 @@
def getNotifier(self, factory_name):
- return self._notifiers.get(factory_name)
+ return self._notifiers.get(factory_name) if self._notifiers else None
def notifierID(self):
Modified: CalendarServer/trunk/txdav/common/datastore/sql_notification.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_notification.py 2016-04-11 21:07:53 UTC (rev 15504)
+++ CalendarServer/trunk/txdav/common/datastore/sql_notification.py 2016-04-11 21:09:14 UTC (rev 15505)
@@ -506,8 +506,6 @@
def addNotifier(self, factory_name, notifier):
- if self._notifiers is None:
- self._notifiers = {}
self._notifiers[factory_name] = notifier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160411/e862760f/attachment.html>
More information about the calendarserver-changes
mailing list