[CalendarServer-changes] [4353] CalendarServer/trunk/lib-patches/Twisted/twisted.application.app. patch

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 17 11:51:13 PDT 2009


Revision: 4353
          http://trac.macosforge.org/projects/calendarserver/changeset/4353
Author:   cdaboo at apple.com
Date:     2009-06-17 11:51:12 -0700 (Wed, 17 Jun 2009)
Log Message:
-----------
Allow logging to FileObserver during tap/caldav.py startup. This broke during the Twisted merge as they
appear to have changed the order in which logging and app startup happen.

Added Paths:
-----------
    CalendarServer/trunk/lib-patches/Twisted/twisted.application.app.patch

Added: CalendarServer/trunk/lib-patches/Twisted/twisted.application.app.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.application.app.patch	                        (rev 0)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.application.app.patch	2009-06-17 18:51:12 UTC (rev 4353)
@@ -0,0 +1,39 @@
+Index: twisted/application/app.py
+===================================================================
+--- twisted/application/app.py	(revision 26969)
++++ twisted/application/app.py	(working copy)
+@@ -241,7 +241,11 @@
+         @param application: The application on which to check for an
+             L{ILogObserver}.
+         """
+-        observer = application.getComponent(ILogObserver, None)
++        
++        if application:
++            observer = application.getComponent(ILogObserver, None)
++        else:
++            observer = None
+ 
+         if observer is None:
+             observer = self._getLogObserver()
+@@ -408,9 +412,7 @@
+         Run the application.
+         """
+         self.preApplication()
+-        self.application = self.createOrGetApplication()
+ 
+-
+         getLogObserverLegacy = getattr(self, 'getLogObserver', None)
+         if getLogObserverLegacy is not None:
+             warnings.warn("Specifying a log observer with getLogObserver is "
+@@ -418,8 +420,10 @@
+                           category=DeprecationWarning)
+             self.startLogging(self.getLogObserver())
+         else:
+-            self.logger.start(self.application)
++            self.logger.start(None)
+ 
++        self.application = self.createOrGetApplication()
++
+         self.postApplication()
+         self.logger.stop()
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090617/29563c53/attachment.html>


More information about the calendarserver-changes mailing list