Revision
874
Author
dreid@apple.com
Date
2006-12-20 15:11:27 -0800 (Wed, 20 Dec 2006)

Log Message

Fixes for twistedcaldav.config changes in caladmin from strause@ibr.cs.tu-bs.de fixes #99

Modified Paths

Diff

Modified: CalendarServer/trunk/twistedcaldav/admin/options.py (873 => 874)


--- CalendarServer/trunk/twistedcaldav/admin/options.py	2006-12-20 22:24:32 UTC (rev 873)
+++ CalendarServer/trunk/twistedcaldav/admin/options.py	2006-12-20 23:11:27 UTC (rev 874)
@@ -156,6 +156,10 @@
         PARAM_GIGA,
         ]
 
+    def __init__(self):
+        SubCommand.__init__(self)
+        self['quota'] = config.UserQuotaBytes
+
     def postOptions(self):
         report = reflect.namedAny(self.action)(self, self.name).run()
         self.parent.formatter.printReport(report)

Modified: CalendarServer/trunk/twistedcaldav/admin/principals.py (873 => 874)


--- CalendarServer/trunk/twistedcaldav/admin/principals.py	2006-12-20 22:24:32 UTC (rev 873)
+++ CalendarServer/trunk/twistedcaldav/admin/principals.py	2006-12-20 23:11:27 UTC (rev 874)
@@ -29,6 +29,7 @@
     def __init__(self, config, type):
         self.config = config
         self.type = type
+        self.quota = self.config['quota']
 
         self.formatter = self.config.parent.formatter
         self.root = self.config.parent.root
@@ -73,7 +74,7 @@
                     util.getQuotaStatsForPrincipal(
                         self.config,
                         pcal,
-                        self.config.parent.config['UserQuotaBytes']))
+                        self.quota))
 
                 precord.update(
                     util.getCalendarDataCounts(pcal))

Modified: CalendarServer/trunk/twistedcaldav/admin/script.py (873 => 874)


--- CalendarServer/trunk/twistedcaldav/admin/script.py	2006-12-20 22:24:32 UTC (rev 873)
+++ CalendarServer/trunk/twistedcaldav/admin/script.py	2006-12-20 23:11:27 UTC (rev 874)
@@ -36,14 +36,14 @@
 from twistedcaldav.admin import options
 from twistedcaldav.admin import formatters
 
-from twistedcaldav.config import config, parseConfig
+from twistedcaldav.config import defaultConfigFile, config, parseConfig
 
 class AdminOptions(usage.Options):
     recursing = 0
     params = ()
 
     optParameters = [
-        ['config', 'c', config.defaultConfigFile, "Path to the caldavd.plist"],
+        ['config', 'c', defaultConfigFile, "Path to the caldavd.plist"],
         ['format', 'f', 'plain', ("Select an appropriate output formatter: "
                                   "%s" % (formatters.listFormatters(),))]
     ]