[CalendarServer-changes] [6179] CalendarServer/trunk/contrib/performance/setbackend.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Aug 25 12:15:20 PDT 2010


Revision: 6179
          http://trac.macosforge.org/projects/calendarserver/changeset/6179
Author:   exarkun at twistedmatrix.com
Date:     2010-08-25 12:15:19 -0700 (Wed, 25 Aug 2010)
Log Message:
-----------
more explicit, more error handling

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/setbackend.py

Modified: CalendarServer/trunk/contrib/performance/setbackend.py
===================================================================
--- CalendarServer/trunk/contrib/performance/setbackend.py	2010-08-25 19:12:46 UTC (rev 6178)
+++ CalendarServer/trunk/contrib/performance/setbackend.py	2010-08-25 19:15:19 UTC (rev 6179)
@@ -4,10 +4,12 @@
 
 def main():
     conf = ElementTree.parse(file(sys.argv[1]))
-    if sys.argv[2] == 'database':
+    if sys.argv[2] == 'postgresql':
         value = 'true'
+    elif sys.argv[2] == 'filesystem':
+        value = 'false'
     else:
-        value = 'false'
+        raise RuntimeError("Don't know what to do with %r" % (sys.argv[2],))
     replace(conf.getiterator(), value)
     conf.write(sys.stdout)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100825/adc32a51/attachment.html>


More information about the calendarserver-changes mailing list