Revision
3612
Author
wsanchez@apple.com
Date
2009-01-26 16:31:29 -0800 (Mon, 26 Jan 2009)

Log Message

Exit on invalid config

Modified Paths

Diff

Modified: CalendarServer/branches/release/CalendarServer-1.4-dev/twistedcaldav/tap.py (3611 => 3612)


--- CalendarServer/branches/release/CalendarServer-1.4-dev/twistedcaldav/tap.py	2009-01-27 00:31:10 UTC (rev 3611)
+++ CalendarServer/branches/release/CalendarServer-1.4-dev/twistedcaldav/tap.py	2009-01-27 00:31:29 UTC (rev 3612)
@@ -16,6 +16,7 @@
 # DRI: David Reid, dreid@apple.com
 ##
 
+import sys
 import os
 import stat
 
@@ -160,7 +161,11 @@
             log.msg("Config file %s not found, using defaults"
                     % (self['config'],))
 
-        parseConfig(self['config'])
+        try:
+            parseConfig(self['config'])
+        except ConfigurationError, e:
+            log.err("Invalid configuration: %s" % (e,))
+            sys.exit(1)
 
         config.updateDefaults(self.overrides)