[Zope-Checkins] CVS: Zope/lib/python/OFS - History.py:1.14.6.1
Chris McDonough
chrism@zope.com
Mon, 16 Dec 2002 12:24:30 -0500
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv10714
Modified Files:
Tag: Zope-2_6-branch
History.py
Log Message:
Change manage_change_history method to not fail with IndexError when underlying storage does not support history.
=== Zope/lib/python/OFS/History.py 1.14 => 1.14.6.1 ===
--- Zope/lib/python/OFS/History.py:1.14 Wed Aug 14 17:42:56 2002
+++ Zope/lib/python/OFS/History.py Mon Dec 16 12:24:29 2002
@@ -113,6 +113,9 @@
r=self._p_jar.db().history(self._p_oid, None, last)
+ if r is None:
+ # storage doesn't support history
+ return ()
r=r[first:]
for d in r: