[CalendarServer-changes] [3091] CalendarServer/trunk/twistedcaldav

source_changes at macosforge.org source_changes at macosforge.org
Tue Sep 30 17:18:44 PDT 2008


Revision: 3091
          http://trac.macosforge.org/projects/calendarserver/changeset/3091
Author:   wsanchez at apple.com
Date:     2008-09-30 17:18:43 -0700 (Tue, 30 Sep 2008)
Log Message:
-----------
Pyflakes

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/cache.py
    CalendarServer/trunk/twistedcaldav/directory/test/test_principal.py
    CalendarServer/trunk/twistedcaldav/log.py
    CalendarServer/trunk/twistedcaldav/notify.py
    CalendarServer/trunk/twistedcaldav/schedule.py
    CalendarServer/trunk/twistedcaldav/test/test_mail.py

Modified: CalendarServer/trunk/twistedcaldav/cache.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/cache.py	2008-09-30 23:58:16 UTC (rev 3090)
+++ CalendarServer/trunk/twistedcaldav/cache.py	2008-10-01 00:18:43 UTC (rev 3091)
@@ -27,7 +27,6 @@
 from twisted.web2.iweb import IResource
 from twisted.web2.stream import MemoryStream
 
-from twistedcaldav.config import config
 from twistedcaldav.log import LoggingMixIn
 from twistedcaldav.memcachepool import CachePoolUserMixIn
 

Modified: CalendarServer/trunk/twistedcaldav/directory/test/test_principal.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/test/test_principal.py	2008-09-30 23:58:16 UTC (rev 3090)
+++ CalendarServer/trunk/twistedcaldav/directory/test/test_principal.py	2008-10-01 00:18:43 UTC (rev 3091)
@@ -21,7 +21,6 @@
 from twisted.web2.dav.fileop import rmdir
 from twisted.web2.dav.resource import AccessDeniedError
 from twisted.web2.test.test_server import SimpleRequest
-from twisted.web2.dav.test.util import serialize
 
 from twistedcaldav.static import CalendarHomeProvisioningFile
 from twistedcaldav.directory.apache import BasicDirectoryService, DigestDirectoryService

Modified: CalendarServer/trunk/twistedcaldav/log.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/log.py	2008-09-30 23:58:16 UTC (rev 3090)
+++ CalendarServer/trunk/twistedcaldav/log.py	2008-10-01 00:18:43 UTC (rev 3091)
@@ -319,6 +319,8 @@
 
     setattr(Logger, level, log_emit)
 
+    del log_emit
+
     #
     # Attach methods to LoggingMixIn
     #
@@ -329,8 +331,10 @@
 
     setattr(LoggingMixIn, "log_%s" % (level,), log_emit)
 
-del level, log_emit
+    del log_emit
 
+del level
+
 # Add some compatibility with twisted's log module
 Logger.msg = Logger.info
 Logger.err = Logger.error

Modified: CalendarServer/trunk/twistedcaldav/notify.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/notify.py	2008-09-30 23:58:16 UTC (rev 3090)
+++ CalendarServer/trunk/twistedcaldav/notify.py	2008-10-01 00:18:43 UTC (rev 3091)
@@ -35,10 +35,10 @@
 # TODO: bindAddress to local
 # TODO: add CalDAVTester test for examining new xmpp-uri property
 
-from twisted.internet import protocol, defer
+from twisted.internet.protocol import ReconnectingClientFactory, ServerFactory
 from twisted.internet.address import IPv4Address
-from twisted.internet.defer import inlineCallbacks, returnValue, Deferred
-from twisted.protocols import basic
+from twisted.internet.defer import inlineCallbacks, Deferred
+from twisted.protocols.basic import LineReceiver
 from twisted.plugin import IPlugin
 from twisted.application import internet, service
 from twisted.python.usage import Options, UsageError
@@ -115,7 +115,7 @@
                 self.log_debug("Skipping notification for: %s" % (url,))
 
 
-class NotificationClientLineProtocol(basic.LineReceiver, LoggingMixIn):
+class NotificationClientLineProtocol(LineReceiver, LoggingMixIn):
     """
     Notification Client Line Protocol
 
@@ -130,7 +130,7 @@
         self.client.removeObserver(self)
 
 
-class NotificationClientFactory(protocol.ReconnectingClientFactory,
+class NotificationClientFactory(ReconnectingClientFactory,
     LoggingMixIn):
     """
     Notification Client Factory
@@ -145,18 +145,14 @@
         self.client = client
 
     def clientConnectionLost(self, connector, reason):
-        self.log_error("Connect to notification server lost: %s" %
-            (reason,))
+        self.log_error("Connect to notification server lost: %s" % (reason,))
         self.connected = False
-        protocol.ReconnectingClientFactory.clientConnectionLost(self,
-            connector, reason)
+        ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
 
     def clientConnectionFailed(self, connector, reason):
-        self.log_error("Unable to connect to notification server: %s" %
-            (reason,))
+        self.log_error("Unable to connect to notification server: %s" % (reason,))
         self.connected = False
-        protocol.ReconnectingClientFactory.clientConnectionFailed(self,
-            connector, reason)
+        ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
 
     def connectionMade(self):
         self.connected = True
@@ -298,7 +294,7 @@
 # Internal Channel (from icalserver to notification server)
 #
 
-class InternalNotificationProtocol(basic.LineReceiver):
+class InternalNotificationProtocol(LineReceiver):
     """
     InternalNotificationProtocol
 
@@ -310,7 +306,7 @@
         self.factory.coalescer.add(op, uri)
 
 
-class InternalNotificationFactory(protocol.ServerFactory):
+class InternalNotificationFactory(ServerFactory):
     """
     Internal Notification Factory
 
@@ -480,7 +476,7 @@
             self.sentReset = True
 
 
-class SimpleLineNotificationProtocol(basic.LineReceiver, LoggingMixIn):
+class SimpleLineNotificationProtocol(LineReceiver, LoggingMixIn):
     """
     Simple Line Notification Protocol
 
@@ -518,7 +514,7 @@
         self.notifier.removeObserver(self)
 
 
-class SimpleLineNotificationFactory(protocol.ServerFactory):
+class SimpleLineNotificationFactory(ServerFactory):
     """
     Simple Line Notification Factory
 

Modified: CalendarServer/trunk/twistedcaldav/schedule.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/schedule.py	2008-09-30 23:58:16 UTC (rev 3090)
+++ CalendarServer/trunk/twistedcaldav/schedule.py	2008-10-01 00:18:43 UTC (rev 3091)
@@ -193,6 +193,7 @@
         """
 
         if config.EnableAutoAcceptTrigger:
+            from twisted.internet import reactor
 
             # Look for auto-accept request parameter
             if request.args:

Modified: CalendarServer/trunk/twistedcaldav/test/test_mail.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_mail.py	2008-09-30 23:58:16 UTC (rev 3090)
+++ CalendarServer/trunk/twistedcaldav/test/test_mail.py	2008-10-01 00:18:43 UTC (rev 3091)
@@ -15,10 +15,7 @@
 ##
 
 from twisted.trial.unittest import TestCase
-from twisted.internet.task import Clock
 from twistedcaldav.mail import *
-from twistedcaldav import config as config_mod
-from twistedcaldav.config import Config
 import email
 import os
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080930/699fa10a/attachment.html 


More information about the calendarserver-changes mailing list