[Zodb-checkins] CVS: Zope3/src/persistence - cache.py:1.7
Tim Peters
tim.one@comcast.net
Mon, 17 Mar 2003 15:06:28 -0500
Update of /cvs-repository/Zope3/src/persistence
In directory cvs.zope.org:/tmp/cvs-serv21713/src/persistence
Modified Files:
cache.py
Log Message:
Cache.incrgc(): Another glitch when Python's garbage collector is also
running. If the thing a weakref refers to gets collected, then calling
the weakref returns None, and None doesn't have a _p_atime (or any
other) attribute.
=== Zope3/src/persistence/cache.py 1.6 => 1.7 ===
--- Zope3/src/persistence/cache.py:1.6 Mon Mar 17 14:44:01 2003
+++ Zope3/src/persistence/cache.py Mon Mar 17 15:06:27 2003
@@ -100,6 +100,8 @@
for oid, ob in self.__active.items():
if ob is not None:
ob = ob()
+ if ob is None:
+ continue
# The _p_atime field is seconds since the start of the day.
# When we start a new day, we'll expect to see most of the
# _p_atime values be greater than now.