[CalendarServer-changes] [10951] CalendarServer/branches/users/sagen/testing

source_changes at macosforge.org source_changes at macosforge.org
Tue Mar 19 13:20:41 PDT 2013


Revision: 10951
          http://trac.calendarserver.org//changeset/10951
Author:   sagen at apple.com
Date:     2013-03-19 13:20:41 -0700 (Tue, 19 Mar 2013)
Log Message:
-----------
Pull up changes from trunk

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/testing/calendarserver/accesslog.py
    CalendarServer/branches/users/sagen/testing/calendarserver/tools/purge.py
    CalendarServer/branches/users/sagen/testing/support/Makefile.Apple
    CalendarServer/branches/users/sagen/testing/twext/python/sendfd.py
    CalendarServer/branches/users/sagen/testing/twistedcaldav/scheduling/ischedule/utils.py
    CalendarServer/branches/users/sagen/testing/txdav/base/propertystore/xattr.py

Removed Paths:
-------------
    CalendarServer/branches/users/sagen/testing/contrib/certupdate/
    CalendarServer/branches/users/sagen/testing/contrib/migration/

Property Changed:
----------------
    CalendarServer/branches/users/sagen/testing/


Property changes on: CalendarServer/branches/users/sagen/testing
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/release/CalendarServer-4.3-dev:10180-10190,10192
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/component-set-fixes:8130-8346
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/ischedule-dkim:9747-9979
/CalendarServer/branches/users/cdaboo/managed-attachments:9985-10145
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/queued-attendee-refreshes:7740-8287
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/cdaboo/txn-debugging:8730-8743
/CalendarServer/branches/users/glyph/always-abort-txn-on-error:9958-9969
/CalendarServer/branches/users/glyph/case-insensitive-uid:8772-8805
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/digest-auth-redux:10624-10635
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/ipv6-client:9054-9105
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/migrate-merge:8690-8713
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/one-home-list-api:10048-10073
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/parallel-upgrade:8376-8400
/CalendarServer/branches/users/glyph/parallel-upgrade_to_1:8571-8583
/CalendarServer/branches/users/glyph/q:9560-9688
/CalendarServer/branches/users/glyph/queue-locking-and-timing:10204-10289
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-fixes:8436-8443
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sharing-api:9192-9205
/CalendarServer/branches/users/glyph/skip-lonely-vtimezones:8524-8535
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/table-alias:8651-8664
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/unshare-when-access-revoked:10562-10595
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/uuid-normalize:9268-9296
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/sagen/testing:10827-10851,10853-10855
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:10857-10929
   + /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/release/CalendarServer-4.3-dev:10180-10190,10192
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/component-set-fixes:8130-8346
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/ischedule-dkim:9747-9979
/CalendarServer/branches/users/cdaboo/managed-attachments:9985-10145
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/queued-attendee-refreshes:7740-8287
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/cdaboo/txn-debugging:8730-8743
/CalendarServer/branches/users/glyph/always-abort-txn-on-error:9958-9969
/CalendarServer/branches/users/glyph/case-insensitive-uid:8772-8805
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/digest-auth-redux:10624-10635
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/ipv6-client:9054-9105
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/migrate-merge:8690-8713
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/one-home-list-api:10048-10073
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/parallel-upgrade:8376-8400
/CalendarServer/branches/users/glyph/parallel-upgrade_to_1:8571-8583
/CalendarServer/branches/users/glyph/q:9560-9688
/CalendarServer/branches/users/glyph/queue-locking-and-timing:10204-10289
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-fixes:8436-8443
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sharing-api:9192-9205
/CalendarServer/branches/users/glyph/skip-lonely-vtimezones:8524-8535
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/table-alias:8651-8664
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/unshare-when-access-revoked:10562-10595
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/uuid-normalize:9268-9296
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/sagen/testing:10827-10851,10853-10855
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:10857-10950

Modified: CalendarServer/branches/users/sagen/testing/calendarserver/accesslog.py
===================================================================
--- CalendarServer/branches/users/sagen/testing/calendarserver/accesslog.py	2013-03-19 19:11:38 UTC (rev 10950)
+++ CalendarServer/branches/users/sagen/testing/calendarserver/accesslog.py	2013-03-19 20:20:41 UTC (rev 10951)
@@ -33,6 +33,7 @@
     import psutil
 except ImportError:
     psutil = None
+from sys import platform
 import time
 
 from calendarserver.logAnalysis import getAdjustedMethodName, \
@@ -627,7 +628,7 @@
             self.previous_cpu = cpu_now
 
         # Memory usage
-        if psutil is not None:
+        if psutil is not None and 'freebsd' not in platform:
             mem = psutil.virtual_memory()
             self.items["memory used"] = mem.used
             self.items["memory percent"] = mem.percent

Modified: CalendarServer/branches/users/sagen/testing/calendarserver/tools/purge.py
===================================================================
--- CalendarServer/branches/users/sagen/testing/calendarserver/tools/purge.py	2013-03-19 19:11:38 UTC (rev 10950)
+++ CalendarServer/branches/users/sagen/testing/calendarserver/tools/purge.py	2013-03-19 20:20:41 UTC (rev 10951)
@@ -876,76 +876,98 @@
 
                         for childName in childNames:
 
-                            childResource = (yield collection.getChild(childName))
-                            # Allways delete inbox items
-                            if self.completely or collName == "inbox":
-                                action = self.CANCELEVENT_SHOULD_DELETE
-                            else:
-                                event = (yield childResource.iCalendar())
-                                event = perUserFilter.filter(event)
-                                action = self._cancelEvent(event, self.when, cua)
-
-                            uri = "/calendars/__uids__/%s/%s/%s" % (uid, collName, childName)
-                            request.path = uri
-                            if action == self.CANCELEVENT_MODIFIED:
-                                count += 1
-                                request._rememberResource(childResource, uri)
-                                storer = StoreCalendarObjectResource(
-                                    request=request,
-                                    destination=childResource,
-                                    destination_uri=uri,
-                                    destinationcal=True,
-                                    destinationparent=collection,
-                                    calendar=str(event),
+                            try:
+                                perresource_request = FakeRequest(self.root, None, None)
+                                perresource_request.checkedSACL = True
+                                perresource_request.authnUser = perresource_request.authzUser = davxml.Principal( 
+                                        davxml.HRef.fromString("/principals/__uids__/%s/" % (uid,))
                                 )
-                                if self.verbose:
-                                    if self.dryrun:
-                                        print("Would modify: %s" % (uri,))
-                                    else:
-                                        print("Modifying: %s" % (uri,))
-                                if not self.dryrun:
-                                    result = (yield storer.run())
+                                perresource_request._rememberResource(collection,
+                                    "/calendars/__uids__/%s/%s/" % (uid, collName))
 
-                            elif action == self.CANCELEVENT_SHOULD_DELETE:
-                                incrementCount = self.dryrun
-                                request._rememberResource(childResource, uri)
-                                if self.verbose:
-                                    if self.dryrun:
-                                        print("Would delete: %s" % (uri,))
-                                    else:
-                                        print("Deleting: %s" % (uri,))
-                                if not self.dryrun:
-                                    retry = False
-                                    try:
-                                        result = (yield childResource.storeRemove(request, self.doimplicit, uri))
-                                        if result != NO_CONTENT:
-                                            print("Error deleting %s/%s/%s: %s" % (uid,
-                                                collName, childName, result))
-                                            retry = True
+                                childResource = (yield collection.getChild(childName))
+
+                                # Allways delete inbox items
+                                if self.completely or collName == "inbox":
+                                    action = self.CANCELEVENT_SHOULD_DELETE
+                                else:
+                                    event = (yield childResource.iCalendar())
+                                    event = perUserFilter.filter(event)
+                                    action = self._cancelEvent(event, self.when, cua)
+
+                                uri = "/calendars/__uids__/%s/%s/%s" % (uid, collName, childName)
+                                perresource_request.path = uri
+                                if action == self.CANCELEVENT_MODIFIED:
+                                    perresource_request._rememberResource(childResource, uri)
+                                    storer = StoreCalendarObjectResource(
+                                        request=perresource_request,
+                                        destination=childResource,
+                                        destination_uri=uri,
+                                        destinationcal=True,
+                                        destinationparent=collection,
+                                        calendar=str(event),
+                                    )
+                                    if self.verbose:
+                                        if self.dryrun:
+                                            print("Would modify: %s" % (uri,))
                                         else:
-                                            incrementCount = True
+                                            print("Modifying: %s" % (uri,))
+                                    if not self.dryrun:
+                                        result = (yield storer.run())
+                                    count += 1
 
-                                    except Exception, e:
-                                        print("Exception deleting %s/%s/%s: %s" % (uid,
-                                            collName, childName, str(e)))
-                                        retry = True
-
-                                    if retry and self.doimplicit:
-                                        # Try again with implicit scheduling off
-                                        print("Retrying deletion of %s/%s/%s with implicit scheduling turned off" % (uid, collName, childName))
+                                elif action == self.CANCELEVENT_SHOULD_DELETE:
+                                    incrementCount = self.dryrun
+                                    perresource_request._rememberResource(childResource, uri)
+                                    if self.verbose:
+                                        if self.dryrun:
+                                            print("Would delete: %s" % (uri,))
+                                        else:
+                                            print("Deleting: %s" % (uri,))
+                                    if not self.dryrun:
+                                        retry = False
                                         try:
-                                            result = (yield childResource.storeRemove(request, False, uri))
+                                            result = (yield childResource.storeRemove(perresource_request, self.doimplicit, uri))
                                             if result != NO_CONTENT:
                                                 print("Error deleting %s/%s/%s: %s" % (uid,
                                                     collName, childName, result))
+                                                retry = True
                                             else:
                                                 incrementCount = True
+
                                         except Exception, e:
-                                            print("Still couldn't delete %s/%s/%s even with implicit scheduling turned off: %s" % (uid, collName, childName, str(e)))
+                                            print("Exception deleting %s/%s/%s: %s" % (uid,
+                                                collName, childName, str(e)))
+                                            retry = True
 
-                                if incrementCount:
-                                    count += 1
+                                        if retry and self.doimplicit:
+                                            # Try again with implicit scheduling off
+                                            print("Retrying deletion of %s/%s/%s with implicit scheduling turned off" % (uid, collName, childName))
+                                            try:
+                                                result = (yield childResource.storeRemove(perresource_request, False, uri))
+                                                if result != NO_CONTENT:
+                                                    print("Error deleting %s/%s/%s: %s" % (uid,
+                                                        collName, childName, result))
+                                                else:
+                                                    incrementCount = True
+                                            except Exception, e:
+                                                print("Still couldn't delete %s/%s/%s even with implicit scheduling turned off: %s" % (uid, collName, childName, str(e)))
 
+                                    if incrementCount:
+                                        count += 1
+                                txn = getattr(perresource_request, "_newStoreTransaction", None)
+                                # Commit
+                                if txn is not None:
+                                    (yield txn.commit())
+
+                            except Exception, e:
+                                # Abort
+                                txn = getattr(perresource_request, "_newStoreTransaction", None)
+                                if txn is not None:
+                                    (yield txn.abort())
+                                raise e
+
+
             txn = getattr(request, "_newStoreTransaction", None)
             # Commit
             if txn is not None:

Modified: CalendarServer/branches/users/sagen/testing/support/Makefile.Apple
===================================================================
--- CalendarServer/branches/users/sagen/testing/support/Makefile.Apple	2013-03-19 19:11:38 UTC (rev 10950)
+++ CalendarServer/branches/users/sagen/testing/support/Makefile.Apple	2013-03-19 20:20:41 UTC (rev 10951)
@@ -36,7 +36,6 @@
 Extra_Environment += PATH="$(SIPP)/usr/bin:$$PATH"
 
 CALDAVDSUBDIR = /caldavd
-WEBAPPSSUBDIR = /apache2/webapps
 
 PYTHON = $(USRBINDIR)/python
 PY_HOME = $(SIPP)$(SHAREDIR)$(CALDAVDSUBDIR)
@@ -86,9 +85,6 @@
 	$(_v) for so in $$(find "$(DSTROOT)$(PY_HOME)/lib" -type f -name '*.so'); do $(STRIP) -Sx "$${so}"; done 
 	$(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)$(ETCDIR)$(CALDAVDSUBDIR)"
 	$(_v) $(INSTALL_FILE) "$(Sources)/conf/caldavd-apple.plist" "$(DSTROOT)$(SIPP)$(ETCDIR)$(CALDAVDSUBDIR)/caldavd-apple.plist"
-	$(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)$(ETCDIR)$(WEBAPPSSUBDIR)"
-	$(_v) $(INSTALL_FILE) "$(Sources)/contrib/migration/com.apple.webapp.contacts.plist" "$(DSTROOT)$(SIPP)$(ETCDIR)$(WEBAPPSSUBDIR)/com.apple.webapp.contacts.plist"
-	$(_v) $(INSTALL_FILE) "$(Sources)/contrib/migration/com.apple.webapp.contactsssl.plist" "$(DSTROOT)$(SIPP)$(ETCDIR)$(WEBAPPSSUBDIR)/com.apple.webapp.contactsssl.plist"
 	$(_v) chmod -R ugo+r "$(DSTROOT)$(PY_HOME)"
 	$(_v) for f in $$(find "$(DSTROOT)$(SIPP)$(ETCDIR)" -type f ! -name '*.default'); do cp "$${f}" "$${f}.default"; done
 
@@ -116,10 +112,6 @@
 	$(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip"
 	$(_v) $(INSTALL_FILE) "$(Sources)/calendarserver/tools/changeip_calendar.py" "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip/changeip_calendar.py"
 	$(_v) chmod ugo+x "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip/changeip_calendar.py"
-	@echo "Installing certificate update scripts..."
-	$(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/certupdate"
-	$(_v) $(INSTALL_FILE) "$(Sources)/contrib/certupdate/calendarcertupdate.py" "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/certupdate/calendarcertupdate.py"
-	$(_v) chmod ugo+x "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/certupdate/calendarcertupdate.py"
 
 install::
 	@echo "Installing CalDAVTester package..."

Modified: CalendarServer/branches/users/sagen/testing/twext/python/sendfd.py
===================================================================
--- CalendarServer/branches/users/sagen/testing/twext/python/sendfd.py	2013-03-19 19:11:38 UTC (rev 10950)
+++ CalendarServer/branches/users/sagen/testing/twext/python/sendfd.py	2013-03-19 20:20:41 UTC (rev 10951)
@@ -15,7 +15,7 @@
 # limitations under the License.
 ##
 
-from struct import pack, unpack
+from struct import pack, unpack, calcsize
 from socket import SOL_SOCKET
 
 from twext.python.sendmsg import sendmsg, recvmsg, SCM_RIGHTS
@@ -62,5 +62,10 @@
     # cmsg_level and cmsg_type really need to be SOL_SOCKET / SCM_RIGHTS, but
     # since those are the *only* standard values, there's not much point in
     # checking.
-    [unpackedFD] = unpack("i", packedFD)
+    unpackedFD = 0
+    int_size = calcsize("i")
+    if len(packedFD) > int_size:       # [ar]happens on 64 bit architecture (FreeBSD)
+        [unpackedFD] = unpack("i", packedFD[0:int_size])
+    else:
+        [unpackedFD] = unpack("i", packedFD)
     return (unpackedFD, data)

Modified: CalendarServer/branches/users/sagen/testing/twistedcaldav/scheduling/ischedule/utils.py
===================================================================
--- CalendarServer/branches/users/sagen/testing/twistedcaldav/scheduling/ischedule/utils.py	2013-03-19 19:11:38 UTC (rev 10950)
+++ CalendarServer/branches/users/sagen/testing/twistedcaldav/scheduling/ischedule/utils.py	2013-03-19 20:20:41 UTC (rev 10951)
@@ -41,10 +41,13 @@
     @return: a C{set} of IPs
     """
     ips = set()
-    for family in (socket.AF_INET, socket.AF_INET6):
-        results = socket.getaddrinfo(host, None, family, socket.SOCK_STREAM)
-        for _ignore_family, _ignore_socktype, _ignore_proto, _ignore_canonname, sockaddr in results:
-            ips.add(sockaddr[0])
+    # Use AF_UNSPEC rather than iterating (socket.AF_INET, socket.AF_INET6)
+    # because getaddrinfo() will raise an exception if no match is found for
+    # the specified family
+    # TODO: potentially use twext.internet.gaiendpoint instead
+    results = socket.getaddrinfo(host, None, socket.AF_UNSPEC, socket.SOCK_STREAM)
+    for _ignore_family, _ignore_socktype, _ignore_proto, _ignore_canonname, sockaddr in results:
+        ips.add(sockaddr[0])
 
     return ips
 

Modified: CalendarServer/branches/users/sagen/testing/txdav/base/propertystore/xattr.py
===================================================================
--- CalendarServer/branches/users/sagen/testing/txdav/base/propertystore/xattr.py	2013-03-19 19:11:38 UTC (rev 10950)
+++ CalendarServer/branches/users/sagen/testing/txdav/base/propertystore/xattr.py	2013-03-19 20:20:41 UTC (rev 10951)
@@ -47,7 +47,7 @@
 # expose.  Its value is 93.
 #
 
-if sys.platform in ("darwin", "freebsd8"):
+if sys.platform in ("darwin", "freebsd8", "freebsd9"):
     _ERRNO_NO_ATTR = getattr(errno, "ENOATTR", 93)
 else:
     _ERRNO_NO_ATTR = errno.ENODATA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130319/504373bc/attachment-0001.html>


More information about the calendarserver-changes mailing list