[CalendarServer-changes] [13784] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Jul 24 08:53:32 PDT 2014


Revision: 13784
          http://trac.calendarserver.org//changeset/13784
Author:   cdaboo at apple.com
Date:     2014-07-24 08:53:32 -0700 (Thu, 24 Jul 2014)
Log Message:
-----------
White space.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/profiles.py
    CalendarServer/trunk/twistedcaldav/ical.py
    CalendarServer/trunk/txdav/caldav/datastore/scheduling/work.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/profiles.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/profiles.py	2014-07-24 15:17:50 UTC (rev 13783)
+++ CalendarServer/trunk/contrib/performance/loadtest/profiles.py	2014-07-24 15:53:32 UTC (rev 13784)
@@ -216,11 +216,11 @@
             name=u'ATTENDEE',
             value=cuaddr.encode("utf-8"),
             params={
-            'CN': record.commonName,
-            'CUTYPE': 'INDIVIDUAL',
-            'PARTSTAT': 'NEEDS-ACTION',
-            'ROLE': 'REQ-PARTICIPANT',
-            'RSVP': 'TRUE',
+                'CN': record.commonName,
+                'CUTYPE': 'INDIVIDUAL',
+                'PARTSTAT': 'NEEDS-ACTION',
+                'ROLE': 'REQ-PARTICIPANT',
+                'RSVP': 'TRUE',
             },
         )
 
@@ -368,11 +368,11 @@
             name=u'ATTENDEE',
             value=cuaddr.encode("utf-8"),
             params={
-            'CN': record.commonName,
-            'CUTYPE': 'INDIVIDUAL',
-            'PARTSTAT': 'NEEDS-ACTION',
-            'ROLE': 'REQ-PARTICIPANT',
-            'RSVP': 'TRUE',
+                'CN': record.commonName,
+                'CUTYPE': 'INDIVIDUAL',
+                'PARTSTAT': 'NEEDS-ACTION',
+                'ROLE': 'REQ-PARTICIPANT',
+                'RSVP': 'TRUE',
             },
         )
 
@@ -741,7 +741,7 @@
         u"start" : u"%(user)s - - - - - - - - - - - %(label)8s BEGIN %(lag)s",
         u"end"   : u"%(user)s - - - - - - - - - - - %(label)8s END [%(duration)5.2f s]",
         u"failed": u"%(user)s x x x x x x x x x x x %(label)8s FAILED %(reason)s",
-        }
+    }
 
     lagFormat = u'{lag %5.2f ms}'
 
@@ -831,12 +831,14 @@
     def report(self, output):
         output.write("\n")
         self.printHeader(output, [
-                (label, width)
-                for (label, width, _ignore_fmt)
-                in self._fields])
-        self.printData(output,
+            (label, width)
+            for (label, width, _ignore_fmt) in self._fields
+        ])
+        self.printData(
+            output,
             [fmt for (label, width, fmt) in self._fields],
-            sorted(self._perOperationTimes.items()))
+            sorted(self._perOperationTimes.items())
+        )
 
     _LATENCY_REASON = "Median %(operation)s scheduling lag greater than %(cutoff)sms"
     _FAILED_REASON = "Greater than %(cutoff).0f%% %(operation)s failed"
@@ -847,12 +849,12 @@
         for operation, lags in self._perOperationLags.iteritems():
             if median(lags) > self._lag_cut_off:
                 reasons.append(self._LATENCY_REASON % dict(
-                        operation=operation.upper(), cutoff=self._lag_cut_off * 1000))
+                    operation=operation.upper(), cutoff=self._lag_cut_off * 1000))
 
         for operation, times in self._perOperationTimes.iteritems():
             failures = len([success for (success, _ignore_duration) in times if not success])
             if failures * 100.0 / len(times) > self._fail_cut_off:
                 reasons.append(self._FAILED_REASON % dict(
-                        operation=operation.upper(), cutoff=self._fail_cut_off))
+                    operation=operation.upper(), cutoff=self._fail_cut_off))
 
         return reasons

Modified: CalendarServer/trunk/twistedcaldav/ical.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/ical.py	2014-07-24 15:17:50 UTC (rev 13783)
+++ CalendarServer/trunk/twistedcaldav/ical.py	2014-07-24 15:53:32 UTC (rev 13784)
@@ -180,7 +180,7 @@
             values are (possibly empty) lists of parameter values.
         """
         if name is None:
-            assert value  is None
+            assert value is None
             assert params is None
 
             pyobj = kwargs["pycalendar"]
@@ -3227,7 +3227,7 @@
 
             timeRange = Period(
                 start=dtstart.value(),
-                end=dtend.value()    if dtend is not None else None,
+                end=dtend.value() if dtend is not None else None,
                 duration=duration.value() if duration is not None else None,
             )
 

Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/work.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/work.py	2014-07-24 15:17:50 UTC (rev 13783)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/work.py	2014-07-24 15:53:32 UTC (rev 13784)
@@ -739,8 +739,10 @@
         rows = (yield Select(
             (srw.WORK_ID,),
             From=srw,
-            Where=(srw.HOME_RESOURCE_ID == self.homeResourceID).And(
-                   srw.RESOURCE_ID == self.resourceID),
+            Where=(
+                srw.HOME_RESOURCE_ID == self.homeResourceID).And(
+                srw.RESOURCE_ID == self.resourceID
+            ),
         ).on(self.transaction))
         if rows:
             log.debug("Schedule refresh for resource-id: {rid} - ignored", rid=self.resourceID)
@@ -876,7 +878,8 @@
         log.debug("ScheduleAutoReplyWork - running for ID: {id}, UID: {uid}", id=self.workID, uid=self.icalendarUid)
 
         # Delete all other work items with the same pushID
-        yield Delete(From=self.table,
+        yield Delete(
+            From=self.table,
             Where=self.table.RESOURCE_ID == self.resourceID
         ).on(self.transaction)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140724/04488ffc/attachment-0001.html>


More information about the calendarserver-changes mailing list