Revision
1570
Author
cdaboo@apple.com
Date
2007-05-24 19:22:17 -0700 (Thu, 24 May 2007)

Log Message

Allow server to start even if Kerberos initialization fails.

Modified Paths

Diff

Modified: CalendarServer/trunk/twistedcaldav/tap.py (1569 => 1570)


--- CalendarServer/trunk/twistedcaldav/tap.py	2007-05-24 23:27:46 UTC (rev 1569)
+++ CalendarServer/trunk/twistedcaldav/tap.py	2007-05-25 02:22:17 UTC (rev 1570)
@@ -446,11 +446,15 @@
                         log.msg("Kerberos support not available")
                         continue
 
-                    principal = schemeConfig['ServicePrincipal']
-                    if not principal:
-                        credFactory = NegotiateCredentialFactory(type="http", hostname=config.ServerHostName)
-                    else:
-                        credFactory = NegotiateCredentialFactory(principal=principal)
+                    try:
+                        principal = schemeConfig['ServicePrincipal']
+                        if not principal:
+                            credFactory = NegotiateCredentialFactory(type="http", hostname=config.ServerHostName)
+                        else:
+                            credFactory = NegotiateCredentialFactory(principal=principal)
+                    except ValueError:
+                        log.msg("Could not start Kerberos")
+                        continue
 
                 elif scheme == 'digest':
                     credFactory = QopDigestCredentialFactory(