[CalendarServer-changes] [15326] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Tue Nov 17 08:57:55 PST 2015
Revision: 15326
http://trac.calendarserver.org//changeset/15326
Author: cdaboo at apple.com
Date: 2015-11-17 08:57:55 -0800 (Tue, 17 Nov 2015)
Log Message:
-----------
Whitespace.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tap/test/test_util.py
CalendarServer/trunk/calendarserver/tools/config.py
CalendarServer/trunk/calendarserver/tools/delegatesmigration.py
CalendarServer/trunk/calendarserver/tools/test/test_config.py
CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
CalendarServer/trunk/calendarserver/webadmin/config.py
CalendarServer/trunk/contrib/od/setup_directory.py
CalendarServer/trunk/contrib/performance/loadtest/population.py
CalendarServer/trunk/contrib/performance/loadtest/profiles.py
CalendarServer/trunk/contrib/performance/loadtest/test_profiles.py
Modified: CalendarServer/trunk/calendarserver/tap/test/test_util.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/test/test_util.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/calendarserver/tap/test/test_util.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -301,6 +301,7 @@
self.assertFalse(success)
+
class AlertTestCase(TestCase):
def test_secondsSinceLastPost(self):
Modified: CalendarServer/trunk/calendarserver/tools/config.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/config.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/calendarserver/tools/config.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -126,6 +126,7 @@
sys.exit(0)
+
def runAsRootCheck():
"""
If we're running in Server.app context and are not running as root, exit.
@@ -137,6 +138,7 @@
sys.exit(1)
+
def main():
runAsRootCheck()
@@ -247,6 +249,7 @@
processArgs(writable, args)
+
def setServiceState(service, state):
"""
Invoke serverctl to enable/disable a service
@@ -258,13 +261,14 @@
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
- output, error = child.communicate()
+ _ignore_output, error = child.communicate()
if child.returncode:
sys.stdout.write(
"Error from serverctl: %d, %s" % (child.returncode, error)
)
+
def setEnabled(enabled):
command = {
"command": "writeConfig",
@@ -278,6 +282,7 @@
runner.run()
+
def setReverseProxies():
"""
Invoke calendarserver_reverse_proxies
Modified: CalendarServer/trunk/calendarserver/tools/delegatesmigration.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/delegatesmigration.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/calendarserver/tools/delegatesmigration.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -86,7 +86,7 @@
def main():
try:
- (optargs, args) = getopt(
+ (optargs, _ignore_args) = getopt(
sys.argv[1:], "d:f:hp:P:s:t:u:", [
"help",
"config=",
@@ -152,6 +152,7 @@
utilityMain(configFileName, DelegatesMigrationService)
+
@inlineCallbacks
def getAssignments(db):
"""
@@ -165,6 +166,7 @@
returnValue(rows)
+
@inlineCallbacks
def copyAssignments(assignments, pod, directory, store):
"""
@@ -272,6 +274,7 @@
print(uid)
+
@inlineCallbacks
def migrateDelegates(service, store, server, user, password, pod, database, dbtype):
print("Migrating from server {}".format(server))
@@ -288,6 +291,5 @@
-
if __name__ == "__main__":
main()
Modified: CalendarServer/trunk/calendarserver/tools/test/test_config.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_config.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/calendarserver/tools/test/test_config.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -410,8 +410,6 @@
)
-
-
def test_keyPath(self):
d = ConfigDict()
setKeyPath(d, "one", "A")
Modified: CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_gateway.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/calendarserver/tools/test/test_gateway.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -183,7 +183,6 @@
-
class GatewayTestCase(RunCommandTestCase):
def _flush(self):
Modified: CalendarServer/trunk/calendarserver/webadmin/config.py
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/config.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/calendarserver/webadmin/config.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -127,7 +127,7 @@
name = html.code(namespace)
value = html.code(
- Logger.publisher.levels.logLevelForNamespace(
+ Logger.levels().logLevelForNamespace(
namespace
).name
)
@@ -138,7 +138,7 @@
)
# FIXME: Using private attributes is bad.
- namespaces = Logger.publisher.levels._logLevelsByNamespace.keys()
+ namespaces = Logger.levels()._logLevelsByNamespace.keys()
return rowsForNamespaces(namespaces)
Modified: CalendarServer/trunk/contrib/od/setup_directory.py
===================================================================
--- CalendarServer/trunk/contrib/od/setup_directory.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/contrib/od/setup_directory.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -260,6 +260,7 @@
sys.exit(0)
+
def lookupRecordName(node, recordType, name):
query, error = odframework.ODQuery.queryWithNode_forRecordTypes_attribute_matchType_queryValues_returnAttributes_maximumResults_error_(
node,
@@ -329,8 +330,6 @@
},
}
-
-
session = odframework.ODSession.defaultSession()
userRecords = []
Modified: CalendarServer/trunk/contrib/performance/loadtest/population.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/population.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/contrib/performance/loadtest/population.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -196,7 +196,7 @@
# There is only one item and caller doesn't want it!
return None
- for i in xrange(100):
+ for _i in xrange(100):
# Try to find one that is not "besides"
n = self._random.randint(0, count - 1)
if besides != n:
@@ -208,7 +208,6 @@
return self._records[n]
-
def _nextUserNumber(self):
result = self._user
self._user += 1
Modified: CalendarServer/trunk/contrib/performance/loadtest/profiles.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/profiles.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/contrib/performance/loadtest/profiles.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -218,7 +218,6 @@
-
class Inviter(ProfileBase):
"""
A Calendar user who invites other users to new events.
@@ -602,6 +601,7 @@
return self._newOperation("create", d)
+
class EventUpdaterBase(ProfileBase):
@inlineCallbacks
@@ -633,10 +633,11 @@
def modifyEvent(self, href, vevent):
- """Overriden by subclasses"""
+ """Overridden by subclasses"""
pass
+
class TitleChanger(EventUpdaterBase):
def setParameters(
@@ -649,12 +650,14 @@
self._interval = interval
self._titleLength = titleLengthDistribution
+
def modifyEvent(self, _ignore_href, vevent):
length = max(5, int(self._titleLength.sample()))
vevent.replaceProperty(Property("SUMMARY", "Event" + "." * (length - 5)))
return succeed("update{title}")
+
class Attacher(EventUpdaterBase):
def setParameters(
@@ -667,6 +670,7 @@
self._interval = interval
self._fileSize = fileSizeDistribution
+
@inlineCallbacks
def modifyEvent(self, href, vevent):
fileSize = int(self._fileSize.sample())
@@ -674,6 +678,7 @@
returnValue("attach{files}")
+
class EventCountLimiter(EventUpdaterBase):
"""
Examines the number of events in each calendar collection, and when that
@@ -691,6 +696,7 @@
self._interval = interval
self._limit = eventCountLimit
+
@inlineCallbacks
def action(self):
# Don't perform any operations until the client is up and running
Modified: CalendarServer/trunk/contrib/performance/loadtest/test_profiles.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/test_profiles.py 2015-11-17 16:31:59 UTC (rev 15325)
+++ CalendarServer/trunk/contrib/performance/loadtest/test_profiles.py 2015-11-17 16:57:55 UTC (rev 15326)
@@ -1094,6 +1094,7 @@
logger.failures())
+
class AlarmAcknowledgerTests(TestCase):
def test_pastTheHour(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20151117/4d6e33de/attachment-0001.html>
More information about the calendarserver-changes
mailing list