Revision
902
Author
dreid@apple.com
Date
2007-01-02 14:38:29 -0800 (Tue, 02 Jan 2007)

Log Message

Make sure we install twistedcaldav.py, and print a helpful message when we can't use kerberos

Modified Paths

Diff

Modified: CalendarServer/trunk/setup.py (901 => 902)


--- CalendarServer/trunk/setup.py	2006-12-23 00:47:35 UTC (rev 901)
+++ CalendarServer/trunk/setup.py	2007-01-02 22:38:29 UTC (rev 902)
@@ -90,7 +90,9 @@
     author_email     = None,
     license          = None,
     platforms        = [ "all" ],
-    packages         = [ "twistedcaldav", "twistedcaldav.directory", "twistedcaldav.method", "twistedcaldav.query", "twistedcaldav.admin" ],
+    packages         = [ "twistedcaldav", "twistedcaldav.directory", 
+                         "twistedcaldav.method", "twistedcaldav.query", 
+                         "twistedcaldav.admin", "twistedcaldav.py" ],
     package_data     = { "twisted": ["plugins/caldav.py"] },
     scripts          = [ "bin/caldavd", "bin/caladmin" ],
     data_files       = data_files

Modified: CalendarServer/trunk/twistedcaldav/tap.py (901 => 902)


--- CalendarServer/trunk/twistedcaldav/tap.py	2006-12-23 00:47:35 UTC (rev 901)
+++ CalendarServer/trunk/twistedcaldav/tap.py	2007-01-02 22:38:29 UTC (rev 902)
@@ -47,8 +47,12 @@
 from twistedcaldav.root import RootResource
 from twistedcaldav.directory.principal import DirectoryPrincipalProvisioningResource
 from twistedcaldav.static import CalendarHomeProvisioningFile
-from twistedcaldav.authkerb import NegotiateCredentialFactory
 
+try:
+    from twistedcaldav.authkerb import NegotiateCredentialFactory
+except ImportError:
+    NegotiateCredentialFactory = None
+
 class CaldavOptions(Options):
     optParameters = [
         ["config", "f", "/etc/caldavd/caldavd.plist",
@@ -190,11 +194,15 @@
 
         for scheme, schemeConfig in config.Authentication.iteritems():
             scheme = scheme.lower()
-            
+
             credFactory = None
 
             if schemeConfig['Enabled']:
                 if scheme == 'kerberos':
+                    if not NegotiateCredentialFactory:
+                        log.msg("Kerberos support not available")
+                        continue
+
                     credFactory = NegotiateCredentialFactory(
                         schemeConfig['ServicePrincipal'])