Revision: 1548 http://trac.macosforge.org/projects/calendarserver/changeset/1548 Author: dreid@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():
participants (1)
-
source_changes@macosforge.org