[CalendarServer-changes] [1957] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 12 07:01:29 PDT 2007
Revision: 1957
http://trac.macosforge.org/projects/calendarserver/changeset/1957
Author: cdaboo at apple.com
Date: 2007-10-12 07:01:28 -0700 (Fri, 12 Oct 2007)
Log Message:
-----------
Very minor source formatting clean-ups. Minor tweaks to logging.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/authkerb.py
CalendarServer/trunk/twistedcaldav/cluster.py
CalendarServer/trunk/twistedcaldav/itip.py
CalendarServer/trunk/twistedcaldav/method/put_common.py
CalendarServer/trunk/twistedcaldav/pdmonster.py
CalendarServer/trunk/twistedcaldav/schedule.py
CalendarServer/trunk/twistedcaldav/tap.py
Modified: CalendarServer/trunk/twistedcaldav/authkerb.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/authkerb.py 2007-10-12 01:35:56 UTC (rev 1956)
+++ CalendarServer/trunk/twistedcaldav/authkerb.py 2007-10-12 14:01:28 UTC (rev 1957)
@@ -22,11 +22,11 @@
This implements two authentication modes:
- 1. An alternative to password based BASIC authentication in which the BASIC credentials are
- verified against Kerberos.
+ 1. An alternative to password based BASIC authentication in which the BASIC credentials are
+ verified against Kerberos.
- 2. The NEGOTIATE mechanism (as defined in http://www.ietf.org/internet-drafts/draft-jaganathan-kerberos-http-01.txt)
- that implements full GSSAPI authentication.
+ 2. The NEGOTIATE mechanism (as defined in http://www.ietf.org/internet-drafts/draft-jaganathan-kerberos-http-01.txt)
+ that implements full GSSAPI authentication.
"""
__all__ = [
Modified: CalendarServer/trunk/twistedcaldav/cluster.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/cluster.py 2007-10-12 01:35:56 UTC (rev 1956)
+++ CalendarServer/trunk/twistedcaldav/cluster.py 2007-10-12 14:01:28 UTC (rev 1957)
@@ -33,8 +33,8 @@
serviceTemplate = """
<service name="%(name)s">
%(listeningInterfaces)s
- <group name="main" scheduler="%(scheduler)s">
- %(hosts)s
+ <group name="main" scheduler="%(scheduler)s">
+ %(hosts)s
</group>
<enable group="main" />
</service>
Modified: CalendarServer/trunk/twistedcaldav/itip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/itip.py 2007-10-12 01:35:56 UTC (rev 1956)
+++ CalendarServer/trunk/twistedcaldav/itip.py 2007-10-12 14:01:28 UTC (rev 1957)
@@ -33,7 +33,6 @@
#
import datetime
-import logging
import md5
import time
@@ -46,6 +45,7 @@
from twisted.web2.dav.resource import AccessDeniedError
from twistedcaldav import caldavxml
+from twistedcaldav import logging
from twistedcaldav.ical import Property, iCalendarProductID
from twistedcaldav.method import report_common
from twistedcaldav.method.put_common import storeCalendarObjectResource
Modified: CalendarServer/trunk/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_common.py 2007-10-12 01:35:56 UTC (rev 1956)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py 2007-10-12 14:01:28 UTC (rev 1957)
@@ -26,7 +26,6 @@
from twisted.internet.defer import Deferred
from twisted.internet.defer import deferredGenerator
from twisted.internet.defer import maybeDeferred
-from twisted.internet.defer import succeed
from twisted.internet.defer import waitForDeferred
from twisted.python import failure, log
from twisted.python.filepath import FilePath
@@ -52,7 +51,6 @@
from twistedcaldav.ical import Component
from twistedcaldav.index import ReservationError
from twistedcaldav.instance import TooManyInstancesError
-from twistedcaldav.resource import CalDAVResource
def storeCalendarObjectResource(
request,
@@ -68,7 +66,7 @@
@param request: the L{twisted.web2.server.Request} for the current HTTP request.
@param source: the L{CalDAVFile} for the source resource to copy from, or None if source data
- is to be read from the request.
+ is to be read from the request.
@param source_uri: the URI for the source resource.
@param destination: the L{CalDAVFile} for the destination resource to copy into.
@param destination_uri: the URI for the destination resource.
@@ -127,8 +125,7 @@
"""
if self.active:
self.active = False
- if logging.canLog("debug"):
- logging.debug("Rollback: rollback", system="Store Resource")
+ logging.debug("Rollback: rollback", system="Store Resource")
try:
if self.source_copy and self.source_deleted:
self.source_copy.moveTo(source.fp)
Modified: CalendarServer/trunk/twistedcaldav/pdmonster.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/pdmonster.py 2007-10-12 01:35:56 UTC (rev 1956)
+++ CalendarServer/trunk/twistedcaldav/pdmonster.py 2007-10-12 14:01:28 UTC (rev 1957)
@@ -31,10 +31,10 @@
result.trap(amp.RemoteAmpError)
if result.value.errorCode != 'UNKNOWN_PORT':
return result
- logging.err('Unknown Port: %s' % (request.remoteAddr,))
+ logging.err('Unknown Port: %s' % (request.remoteAddr,), system="PDClientAddressWrapper")
def _gotAddress(result):
- logging.debug('result = %r' % (result,))
+ logging.debug('result = %r' % (result,), system="PDClientAddressWrapper")
request.remoteAddr = address.IPv4Address(
'TCP',
result['host'],
@@ -46,7 +46,7 @@
return
host, port = request.remoteAddr.host, request.remoteAddr.port
- logging.debug("GetClientAddress(host=%r, port=%r)" % (host, port))
+ logging.debug("GetClientAddress(host=%r, port=%r)" % (host, port), system="PDClientAddressWrapper")
d = self.protocol.callRemoteString("GetClientAddress",
host=host,
port=str(port))
Modified: CalendarServer/trunk/twistedcaldav/schedule.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/schedule.py 2007-10-12 01:35:56 UTC (rev 1956)
+++ CalendarServer/trunk/twistedcaldav/schedule.py 2007-10-12 14:01:28 UTC (rev 1957)
@@ -38,12 +38,12 @@
from twistedcaldav import caldavxml
from twistedcaldav import itip
+from twistedcaldav import logging
from twistedcaldav.resource import CalDAVResource
from twistedcaldav.caldavxml import caldav_namespace, TimeRange
from twistedcaldav.config import config
from twistedcaldav.customxml import calendarserver_namespace
from twistedcaldav.ical import Component
-import logging
from twistedcaldav.method import report_common
from twistedcaldav.method.put_common import storeCalendarObjectResource
from twistedcaldav.resource import isCalendarCollectionResource
Modified: CalendarServer/trunk/twistedcaldav/tap.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/tap.py 2007-10-12 01:35:56 UTC (rev 1956)
+++ CalendarServer/trunk/twistedcaldav/tap.py 2007-10-12 14:01:28 UTC (rev 1957)
@@ -360,7 +360,7 @@
directoryClass = namedClass(config.DirectoryService['type'])
logging.info("Configuring directory service of type: %s"
- % (config.DirectoryService['type'],))
+ % (config.DirectoryService['type'],), system="startup")
baseDirectory = directoryClass(**config.DirectoryService['params'])
@@ -370,7 +370,7 @@
if config.SudoersFile and os.path.exists(config.SudoersFile):
logging.info("Configuring SudoDirectoryService with file: %s"
- % (config.SudoersFile,))
+ % (config.SudoersFile,), system="startup")
sudoDirectory = SudoDirectoryService(config.SudoersFile)
sudoDirectory.realmName = baseDirectory.realmName
@@ -379,7 +379,7 @@
directories.insert(0, sudoDirectory)
else:
logging.info("Not using SudoDirectoryService; file doesn't exist: %s"
- % (config.SudoersFile,))
+ % (config.SudoersFile,), system="startup")
directory = AggregateDirectoryService(directories)
@@ -391,9 +391,9 @@
# Setup Resource hierarchy
#
- logging.info("Setting up document root at: %s" % (config.DocumentRoot,))
+ logging.info("Setting up document root at: %s" % (config.DocumentRoot,), system="startup")
- logging.info("Setting up principal collection: %r" % (self.principalResourceClass,))
+ logging.info("Setting up principal collection: %r" % (self.principalResourceClass,), system="startup")
principalCollection = self.principalResourceClass(
os.path.join(config.DocumentRoot, 'principals'),
@@ -401,7 +401,7 @@
directory
)
- logging.info("Setting up calendar collection: %r" % (self.calendarResourceClass,))
+ logging.info("Setting up calendar collection: %r" % (self.calendarResourceClass,), system="startup")
calendarCollection = self.calendarResourceClass(
os.path.join(config.DocumentRoot, 'calendars'),
@@ -409,7 +409,7 @@
'/calendars/'
)
- logging.info("Setting up root resource: %r" % (self.rootResourceClass,))
+ logging.info("Setting up root resource: %r" % (self.rootResourceClass,), system="startup")
root = self.rootResourceClass(
config.DocumentRoot,
@@ -421,7 +421,7 @@
# Configure default ACLs on the root resource
- logging.info("Setting up default ACEs on root resource")
+ logging.info("Setting up default ACEs on root resource", system="startup")
rootACEs = [
davxml.ACE(
@@ -430,10 +430,10 @@
),
]
- logging.info("Setting up AdminPrincipals")
+ logging.info("Setting up AdminPrincipals", system="startup")
for principal in config.AdminPrincipals:
- logging.info("Added %s as admin principal" % (principal,))
+ logging.info("Added %s as admin principal" % (principal,), system="startup")
rootACEs.append(
davxml.ACE(
@@ -444,7 +444,7 @@
)
)
- logging.info("Setting root ACL")
+ logging.info("Setting root ACL", system="startup")
root.setAccessControlList(davxml.ACL(*rootACEs))
@@ -460,7 +460,7 @@
realm = directory.realmName or ""
- logging.info("Configuring authentication for realm: %s" % (realm,))
+ logging.info("Configuring authentication for realm: %s" % (realm,), system="startup")
for scheme, schemeConfig in config.Authentication.iteritems():
scheme = scheme.lower()
@@ -468,11 +468,11 @@
credFactory = None
if schemeConfig['Enabled']:
- logging.info("Setting up scheme: %s" % (scheme,))
+ logging.info("Setting up scheme: %s" % (scheme,), system="startup")
if scheme == 'kerberos':
if not NegotiateCredentialFactory:
- logging.info("Kerberos support not available")
+ logging.info("Kerberos support not available", system="startup")
continue
try:
@@ -482,7 +482,7 @@
else:
credFactory = NegotiateCredentialFactory(principal=principal)
except ValueError:
- logging.info("Could not start Kerberos")
+ logging.info("Could not start Kerberos", system="startup")
continue
elif scheme == 'digest':
@@ -497,12 +497,12 @@
credFactory = BasicCredentialFactory(realm)
else:
- log.err("Unknown scheme: %s" % (scheme,))
+ logging.err("Unknown scheme: %s" % (scheme,), system="startup")
if credFactory:
credentialFactories.append(credFactory)
- logging.info("Configuring authentication wrapper")
+ logging.info("Configuring authentication wrapper", system="startup")
authWrapper = auth.AuthenticationWrapper(
root,
@@ -517,7 +517,7 @@
# Configure the service
#
- logging.info("Setting up service")
+ logging.info("Setting up service", system="startup")
if config.ProcessType == 'Slave':
if config.MultiProcess['ProcessCount'] > 1 and config.MultiProcess['LoadBalancer']['Enabled']:
@@ -537,7 +537,7 @@
logObserver = logging.RotatingFileAccessLoggingObserver(config.AccessLogFile)
logging.info("Configuring log observer: %s" % (
- logObserver,))
+ logObserver,), system="startup")
service = CalDAVService(logObserver)
@@ -562,13 +562,13 @@
config.BindSSLPorts = [config.SSLPort]
for port in config.BindHTTPPorts:
- logging.info("Adding server at %s:%s" % (bindAddress, port))
+ logging.info("Adding server at %s:%s" % (bindAddress, port), system="startup")
httpService = internet.TCPServer(int(port), channel, interface=bindAddress)
httpService.setServiceParent(service)
for port in config.BindSSLPorts:
- logging.info("Adding SSL server at %s:%s" % (bindAddress, port))
+ logging.info("Adding SSL server at %s:%s" % (bindAddress, port), system="startup")
contextFactory = ChainingOpenSSLContextFactory(config.SSLPrivateKey, config.SSLCertificate, certificateChainFile=config.SSLAuthorityChain)
httpsService = internet.SSLServer(int(port), channel, contextFactory, interface=bindAddress)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20071012/79a875d2/attachment-0001.html
More information about the calendarserver-changes
mailing list