[CalendarServer-changes] [8531] CalendarServer/branches/users/glyph/skip-lonely-vtimezones
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jan 13 14:03:12 PST 2012
Revision: 8531
http://trac.macosforge.org/projects/calendarserver/changeset/8531
Author: glyph at apple.com
Date: 2012-01-13 14:03:12 -0800 (Fri, 13 Jan 2012)
Log Message:
-----------
clean up trailing whitespace
Modified Paths:
--------------
CalendarServer/branches/users/glyph/skip-lonely-vtimezones/txdav/caldav/datastore/util.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/skip-lonely-vtimezones/
Modified: CalendarServer/branches/users/glyph/skip-lonely-vtimezones/txdav/caldav/datastore/util.py
===================================================================
--- CalendarServer/branches/users/glyph/skip-lonely-vtimezones/txdav/caldav/datastore/util.py 2012-01-13 22:03:09 UTC (rev 8530)
+++ CalendarServer/branches/users/glyph/skip-lonely-vtimezones/txdav/caldav/datastore/util.py 2012-01-13 22:03:12 UTC (rev 8531)
@@ -138,12 +138,12 @@
@return: a tuple of (ok count, bad count)
"""
-
+
ok_count = 0
bad_count = 0
outCalendar.properties().update(inCalendar.properties())
for calendarObject in (yield inCalendar.calendarObjects()):
-
+
try:
# Must account for metadata
component = (yield calendarObject.component()) # XXX WRONG SHOULD CALL getComponent
@@ -160,7 +160,7 @@
calendarObject.name())
if outCalendar.objectResourcesHaveProperties():
outObject.properties().update(calendarObject.properties())
-
+
if inCalendar.name() == "inbox":
# Because of 9023803, skip attachment processing within inboxes
continue
@@ -176,16 +176,16 @@
proto =_AttachmentMigrationProto(transport)
attachment.retrieve(proto)
yield proto.done
-
- ok_count += 1
+ ok_count += 1
+
except InternalDataStoreError:
log.error(" InternalDataStoreError: Failed to migrate calendar object: %s/%s/%s" % (
inCalendar.ownerHome().name(),
inCalendar.name(),
calendarObject.name(),
))
- bad_count += 1
+ bad_count += 1
except Exception, e:
log.error(" %s: Failed to migrate calendar object: %s/%s/%s" % (
@@ -194,13 +194,13 @@
inCalendar.name(),
calendarObject.name(),
))
- bad_count += 1
+ bad_count += 1
returnValue((ok_count, bad_count,))
# MIME helpers - mostly copied from twext.web2.static
-
+
def loadMimeTypes(mimetype_locations=['/etc/mime.types']):
"""
Multiple file locations containing mime-types can be passed as a list.
@@ -391,7 +391,7 @@
"""
self._attachment = attachment
self._contentType = contentType
-
+
# Make sure we have some kind of contrent-type
if self._contentType is None:
self._contentType = http_headers.MimeType.fromString(getType(self._attachment.name(), self.contentTypes))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120113/c23ea1a2/attachment.html>
More information about the calendarserver-changes
mailing list