[Zope3-checkins] CVS: Zope3/src/zope/app/vfs/content - folder.py:1.4
Anthony Baxter
anthony@interlink.com.au
Thu, 9 Jan 2003 05:23:17 -0500
Update of /cvs-repository/Zope3/src/zope/app/vfs/content
In directory cvs.zope.org:/tmp/cvs-serv5575
Modified Files:
folder.py
Log Message:
Some objects don't have a notion of a creation time or modification time.
DublinCore returns 'None' for these.
=== Zope3/src/zope/app/vfs/content/folder.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/vfs/content/folder.py:1.3 Mon Dec 30 09:03:20 2002
+++ Zope3/src/zope/app/vfs/content/folder.py Thu Jan 9 05:23:14 2003
@@ -58,6 +58,8 @@
def _getServiceManagerStat(self):
"""Get the stat information of the local service manager."""
+ # XXX SteveA owes one test case for this. he promised, and I have the
+ # IRC logs to prove it.
# XXX ServiceManager does not use the DublinCore to keep track of its
# creation and modification times, so we use the data of the Folder
# right now.
@@ -65,11 +67,15 @@
if dc is not None:
created = dc.created
modified = dc.modified
+ # Some objects don't have a created or a modified time.
+ # DublinCore returns None for these.
+ if created is None:
+ created = zerotime
+ if modified is None:
+ modified = created
else:
created = zerotime
modified = zerotime
- if modified is None:
- modified = created
dir_mode = 16384 + 504
uid = "nouser"
gid = "nogroup"