[CalendarServer-changes] [13031] CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 28 13:56:44 PDT 2014


Revision: 13031
          http://trac.calendarserver.org//changeset/13031
Author:   wsanchez at apple.com
Date:     2014-03-28 13:56:44 -0700 (Fri, 28 Mar 2014)
Log Message:
-----------
lint

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py

Modified: CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py	2014-03-28 19:55:42 UTC (rev 13030)
+++ CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py	2014-03-28 20:56:44 UTC (rev 13031)
@@ -29,7 +29,9 @@
 from twisted.internet.protocol import ClientCreator
 from twisted.protocols import amp
 from twisted.python.constants import Names, NamedConstant
-from txdav.caldav.icalendardirectoryservice import ICalendarStoreDirectoryRecord
+from txdav.caldav.icalendardirectoryservice import (
+    ICalendarStoreDirectoryRecord
+)
 from txdav.common.idirectoryservice import IStoreDirectoryService
 from txdav.dps.commands import (
     RecordWithShortNameCommand, RecordWithUIDCommand, RecordWithGUIDCommand,
@@ -61,7 +63,8 @@
 ## LDAP
 ## Tests from old twistedcaldav/directory
 ## Cmd line tools
-## Store based directory service (records in the store, i.e. locations/resources)
+## Store based directory service (records in the store, i.e.
+##    locations/resources)
 ## Separate store for DPS (augments and delegates separate from calendar data)
 ## calverify needs deferreds, including:
 ##    component.normalizeCalendarUserAddresses
@@ -157,7 +160,9 @@
         # path = "data/Logs/state/directory-proxy.sock"
         if getattr(self, "_connection", None) is None:
             log.debug("Creating connection")
-            connection = (yield ClientCreator(reactor, amp.AMP).connectUNIX(path))
+            connection = (
+                yield ClientCreator(reactor, amp.AMP).connectUNIX(path)
+            )
             self._connection = connection
         else:
             log.debug("Already have connection")
@@ -241,8 +246,9 @@
         )
 
 
-    def recordsMatchingTokens(self, tokens, context=None, limitResults=50,
-                              timeoutSeconds=10):
+    def recordsMatchingTokens(
+        self, tokens, context=None, limitResults=50, timeoutSeconds=10
+    ):
         return self._call(
             RecordsMatchingTokensCommand,
             self._processMultipleRecords,
@@ -251,8 +257,9 @@
         )
 
 
-    def recordsMatchingFields(self, fields, operand=Operand.OR, recordType=None):
-
+    def recordsMatchingFields(
+        self, fields, operand=Operand.OR, recordType=None
+    ):
         newFields = []
         for fieldName, searchTerm, matchFlags, matchType in fields:
             newFields.append(
@@ -276,7 +283,10 @@
 
 
     def recordsFromExpression(self, expression):
-        raise NotImplementedError("This won't work until expressions are serializable to send across AMP")
+        raise NotImplementedError(
+            "This won't work until expressions are serializable to send "
+            "across AMP"
+        )
 
 
 
@@ -370,22 +380,28 @@
     if record:
         authenticated = (yield record.verifyPlaintextPassword("negas"))
         print("plain auth: {a}".format(a=authenticated))
-    """
-    record = (yield ds.recordWithUID("__dre__"))
-    print("uid: {r}".format(r=record))
-    if record:
-        authenticated = (yield record.verifyPlaintextPassword("erd"))
-        print("plain auth: {a}".format(a=authenticated))
-    record = (yield ds.recordWithGUID("A3B1158F-0564-4F5B-81E4-A89EA5FF81B0"))
-    print("guid: {r}".format(r=record))
-    records = (yield ds.recordsWithRecordType(RecordType.user))
-    print("recordType: {r}".format(r=records))
-    records = (yield ds.recordsWithEmailAddress("cdaboo at bitbucket.calendarserver.org"))
-    print("emailAddress: {r}".format(r=records))
-    """
 
+    # record = (yield ds.recordWithUID("__dre__"))
+    # print("uid: {r}".format(r=record))
+    # if record:
+    #     authenticated = (yield record.verifyPlaintextPassword("erd"))
+    #     print("plain auth: {a}".format(a=authenticated))
 
+    # record = yield ds.recordWithGUID(
+    #     "A3B1158F-0564-4F5B-81E4-A89EA5FF81B0"
+    # )
+    # print("guid: {r}".format(r=record))
 
+    # records = yield ds.recordsWithRecordType(RecordType.user)
+    # print("recordType: {r}".format(r=records))
+
+    # records = yield ds.recordsWithEmailAddress(
+    #     "cdaboo at bitbucket.calendarserver.org"
+    # )
+    # print("emailAddress: {r}".format(r=records))
+
+
+
 def succeeded(result):
     print("yay")
     reactor.stop()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140328/e6c5f850/attachment-0001.html>


More information about the calendarserver-changes mailing list