[CalendarServer-changes] [3613] CalendarServer/branches/release/CalendarServer-1.4-dev/twistedcaldav /config.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jan 26 16:32:45 PST 2009
Revision: 3613
http://trac.macosforge.org/projects/calendarserver/changeset/3613
Author: wsanchez at apple.com
Date: 2009-01-26 16:32:44 -0800 (Mon, 26 Jan 2009)
Log Message:
-----------
raise ConfigurationError if a deprecated confic option and its replacement are both specified.
Modified Paths:
--------------
CalendarServer/branches/release/CalendarServer-1.4-dev/twistedcaldav/config.py
Modified: CalendarServer/branches/release/CalendarServer-1.4-dev/twistedcaldav/config.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-1.4-dev/twistedcaldav/config.py 2009-01-27 00:31:29 UTC (rev 3612)
+++ CalendarServer/branches/release/CalendarServer-1.4-dev/twistedcaldav/config.py 2009-01-27 00:32:44 UTC (rev 3613)
@@ -276,6 +276,11 @@
def deprecated(oldKey, newKey):
log.err("Configuration option %r is deprecated in favor of %r." % (oldKey, newKey))
+ if oldKey in configDict and newKey in configDict:
+ raise ConfigurationError(
+ "Both %r and %r options are specified; use the %r option only."
+ % (oldKey, newKey, newKey)
+ )
def renamed(oldKey, newKey):
deprecated(oldKey, newKey)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090126/8ae98d8b/attachment.html>
More information about the calendarserver-changes
mailing list