[CalendarServer-changes] [7842] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Aug 1 13:58:53 PDT 2011


Revision: 7842
          http://trac.macosforge.org/projects/calendarserver/changeset/7842
Author:   wsanchez at apple.com
Date:     2011-08-01 13:58:51 -0700 (Mon, 01 Aug 2011)
Log Message:
-----------
Fix Ticket #347

Modified Paths:
--------------
    CalendarServer/trunk/twext/web2/dav/xattrprops.py
    CalendarServer/trunk/txdav/base/propertystore/xattr.py

Modified: CalendarServer/trunk/twext/web2/dav/xattrprops.py
===================================================================
--- CalendarServer/trunk/twext/web2/dav/xattrprops.py	2011-08-01 20:38:25 UTC (rev 7841)
+++ CalendarServer/trunk/twext/web2/dav/xattrprops.py	2011-08-01 20:58:51 UTC (rev 7842)
@@ -57,11 +57,12 @@
 
 # RFC 2518 Section 12.13.1 says that removal of non-existing property
 # is not an error.  python-xattr on Linux fails with ENODATA in this
-# case.  On OS X, the xattr library fails with ENOATTR, which CPython
-# does not expose.  Its value is 93.
-_ATTR_MISSING = (errno.ENODATA, 93)
+# case.  On Darwin and FreeBSD, the xattr library fails with ENOATTR,
+# which CPython does not expose.  Its value is 93.
+_ATTR_MISSING = (93,)
+if hasattr(errno, "ENODATA"):
+    _ATTR_MISSING += (errno.ENODATA,)
 
-
 class xattrPropertyStore (object):
     """
 

Modified: CalendarServer/trunk/txdav/base/propertystore/xattr.py
===================================================================
--- CalendarServer/trunk/txdav/base/propertystore/xattr.py	2011-08-01 20:38:25 UTC (rev 7841)
+++ CalendarServer/trunk/txdav/base/propertystore/xattr.py	2011-08-01 20:58:51 UTC (rev 7842)
@@ -46,7 +46,7 @@
 # expose.  Its value is 93.
 #
 
-if sys.platform is "darwin":
+if sys.platform in ("darwin", "freebsd8"):
     _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/20110801/e93a593b/attachment.html>


More information about the calendarserver-changes mailing list