[CalendarServer-changes] [1548]
CalendarServer/trunk/twistedcaldav/admin
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 22 11:16:54 PDT 2007
Revision: 1548
http://trac.macosforge.org/projects/calendarserver/changeset/1548
Author: dreid at apple.com
Date: 2007-05-22 11:16:54 -0700 (Tue, 22 May 2007)
Log Message:
-----------
Get rid of the assertion, catch the OSError and print it with an appropriate sys.exit(non-zero) and print a message stating why we've fallen back to the default pprint reporter.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/admin/formatters.py
CalendarServer/trunk/twistedcaldav/admin/script.py
CalendarServer/trunk/twistedcaldav/admin/util.py
Modified: CalendarServer/trunk/twistedcaldav/admin/formatters.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/admin/formatters.py 2007-05-22 17:35:40 UTC (rev 1547)
+++ CalendarServer/trunk/twistedcaldav/admin/formatters.py 2007-05-22 18:16:54 UTC (rev 1548)
@@ -64,6 +64,7 @@
reportPrinter(report)
else:
+ print "No report printer found for report type %r" % (report,)
self.report_default(report)
def report_default(self, report):
Modified: CalendarServer/trunk/twistedcaldav/admin/script.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/admin/script.py 2007-05-22 17:35:40 UTC (rev 1547)
+++ CalendarServer/trunk/twistedcaldav/admin/script.py 2007-05-22 18:16:54 UTC (rev 1548)
@@ -120,6 +120,9 @@
print "%s: %s" % (cmd, ue)
+ except OSError, osErr:
+ print osErr
+ sys.exit(1)
except KeyboardInterrupt:
sys.exit(1)
Modified: CalendarServer/trunk/twistedcaldav/admin/util.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/admin/util.py 2007-05-22 17:35:40 UTC (rev 1547)
+++ CalendarServer/trunk/twistedcaldav/admin/util.py 2007-05-22 18:16:54 UTC (rev 1548)
@@ -59,8 +59,7 @@
def getPrincipalList(principalCollection, type, disabled=False):
typeRoot = principalCollection.child(type)
- assert typeRoot.exists(), "Does not exist: %s" % typeRoot.path
-
+
pl = []
for child in typeRoot.listdir():
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070522/4368519d/attachment.html
More information about the calendarserver-changes
mailing list