[CalendarServer-changes] [2336] CalendarServer/branches/release/CalendarServer-1.3-dev/twistedcaldav /admin/principals.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Apr 22 14:13:32 PDT 2008


Revision: 2336
          http://trac.macosforge.org/projects/calendarserver/changeset/2336
Author:   wsanchez at apple.com
Date:     2008-04-22 14:13:31 -0700 (Tue, 22 Apr 2008)

Log Message:
-----------
Pull up r2332, r2335: caladmin's per-user stats wrong

Modified Paths:
--------------
    CalendarServer/branches/release/CalendarServer-1.3-dev/twistedcaldav/admin/principals.py

Modified: CalendarServer/branches/release/CalendarServer-1.3-dev/twistedcaldav/admin/principals.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-1.3-dev/twistedcaldav/admin/principals.py	2008-04-22 19:28:16 UTC (rev 2335)
+++ CalendarServer/branches/release/CalendarServer-1.3-dev/twistedcaldav/admin/principals.py	2008-04-22 21:13:31 UTC (rev 2336)
@@ -63,26 +63,40 @@
                 precord = {}
                 
                 pcal = self.calendarCollection.child(
-                    self.type
+                    "__uids__"
                     ).child(p.basename())
             
                 precord['principalName'] = p.basename()
                 
-                precord['calendarHome'] = pcal.path
-
-                precord.update(
-                    util.getQuotaStatsForPrincipal(
-                        self.config,
-                        pcal,
-                        self.quota))
-
-                precord.update(
-                    util.getCalendarDataCounts(pcal))
-
-                precord['diskUsage'] = util.getDiskUsage(self.config, pcal)
-                
-                precord['disabled'] = util.isPrincipalDisabled(p)
-                
+                if pcal.exists():
+                    precord['calendarHome'] = pcal.path
+    
+                    precord.update(
+                        util.getQuotaStatsForPrincipal(
+                            self.config,
+                            pcal,
+                            self.quota))
+    
+                    precord.update(
+                        util.getCalendarDataCounts(pcal))
+    
+                    precord['diskUsage'] = util.getDiskUsage(self.config, pcal)
+                    
+                    precord['disabled'] = util.isPrincipalDisabled(p)
+                else: 
+                    precord.update({ 
+                        'calendarHome':  "-", 
+                        'quotaRoot':     "-", 
+                        'quotaUsed':     "-", 
+                        'quotaAvail':    "-", 
+                        'quotaFree':     "-", 
+                        'calendarCount': "-", 
+                        'eventCount':    "-", 
+                        'todoCount':     "-", 
+                        'diskUsage':     "-", 
+                        'disabled':      "-", 
+                    }) 
+                     
                 yield precord
 
         report['records'] = _getRecords()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080422/2d6e56df/attachment-0001.html


More information about the calendarserver-changes mailing list