[CalendarServer-changes] [291]
CalendarServer/trunk/twistedcaldav/index.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Oct 23 21:30:44 PDT 2006
Revision: 291
http://trac.macosforge.org/projects/calendarserver/changeset/291
Author: wsanchez at apple.com
Date: 2006-10-23 21:30:44 -0700 (Mon, 23 Oct 2006)
Log Message:
-----------
log some errors
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/index.py
Modified: CalendarServer/trunk/twistedcaldav/index.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/index.py 2006-10-24 04:30:09 UTC (rev 290)
+++ CalendarServer/trunk/twistedcaldav/index.py 2006-10-24 04:30:44 UTC (rev 291)
@@ -35,7 +35,6 @@
from pysqlite2 import dbapi2 as sqlite
from twisted.python import log
-from twisted.python.failure import Failure
from twistedcaldav.dateops import normalizeForIndex
from twistedcaldav.ical import Component
@@ -645,9 +644,16 @@
#
fp = self.resource.fp
for name in fp.listdir():
- if name == db_basename: continue
- stream = fp.child(name).open()
+ if name == db_basename:
+ continue
+
try:
+ stream = fp.child(name).open()
+ except (IOError, OSError), e:
+ log.err("Unable to open resource %s: %s" % (name, e))
+ continue
+
+ try:
# FIXME: This is blocking I/O
try:
calendar = Component.fromStream(stream)
@@ -744,9 +750,16 @@
#
fp = self.resource.fp
for name in fp.listdir():
- if name == db_basename: continue
- stream = fp.child(name).open()
+ if name == db_basename:
+ continue
+
try:
+ stream = fp.child(name).open()
+ except (IOError, OSError), e:
+ log.err("Unable to open resource %s: %s" % (name, e))
+ continue
+
+ try:
# FIXME: This is blocking I/O
try:
calendar = Component.fromStream(stream)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061023/4b248f3b/attachment.html
More information about the calendarserver-changes
mailing list