[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/dav/ Merge r26634 from trunk: Fix the DAV breakage introduced by r26364.

Philipp von Weitershausen philikon at philikon.de
Tue Jul 20 11:47:18 EDT 2004


Log message for revision 26635:
  Merge r26634 from trunk: Fix the DAV breakage introduced by r26364.
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/dav/adapter.py
  A   Zope3/branches/ZopeX3-3.0/src/zope/app/dav/tests/test_adapter.py


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/dav/adapter.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/dav/adapter.py	2004-07-20 15:37:40 UTC (rev 26634)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/dav/adapter.py	2004-07-20 15:47:18 UTC (rev 26635)
@@ -38,13 +38,14 @@
         if IReadDirectory(self.context, None) is not None:
             value = value + '/'
         return value
+    displayname = property(displayname)
 
     def creationdate(self):
-        value = IDCTimes(self.context).created
-        if value is None:
+        dc = IDCTimes(self.context, None)
+        if dc is None or dc.created is None:
             return ''
-        value = value.strftime('%Y-%m-%d %TZ')
-        return value
+        return dc.created.strftime('%Y-%m-%d %TZ')
+    creationdate = property(creationdate)
 
     def resourcetype(self):
         value = IReadDirectory(self.context, None)
@@ -53,17 +54,22 @@
             node = xml.createElement('collection')
             return node
         return ''
+    resourcetype = property(resourcetype)
 
     def getcontentlength(self):
-        value = ISized(self.context).sizeForDisplay()
-        return str(value)
+        sized = ISized(self.context, None)
+        if sized is None:
+            return ''
+        return str(sized.sizeForDisplay())
+    getcontentlength = property(getcontentlength)
 
     def getlastmodified(self):
-        value = IDCTimes(self.context).modified
-        if value is None:
+        dc = IDCTimes(self.context, None)
+        if dc is None or dc.created is None:
             return ''
-        value = value.strftime('%a, %d %b %Y %H:%M:%S GMT')
-        return value
+        return dc.modified.strftime('%a, %d %b %Y %H:%M:%S GMT')
+    getlastmodified = property(getlastmodified)
 
     def executable(self):
         return ''
+    executable = property(executable)

Copied: Zope3/branches/ZopeX3-3.0/src/zope/app/dav/tests/test_adapter.py (from rev 26634, Zope3/trunk/src/zope/app/dav/tests/test_adapter.py)


Property changes on: Zope3/branches/ZopeX3-3.0/src/zope/app/dav/tests/test_adapter.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native



More information about the Zope3-Checkins mailing list