[ZODB-Dev] ZODB 3.1.2 beta 1 released!
Nicholas Henke
henken at seas.upenn.edu
Wed May 14 01:50:43 EDT 2003
On Tue, 2003-05-13 at 20:35, Nicholas Henke wrote:
> I guess I am on a roll... this looks to be broken.
>
> Traceback (most recent call last):
> File "/var/tmp/python2.2-2.2.2-root/usr/lib/python2.2/threading.py",
> line 408, in __bootstrap
> self.run()
> File "resource_manager.py", line 48, in run
> self.go()
> File "resource_manager.py", line 98, in go
> self.db.getDatabaseCacheDetail()
> File "/usr/lib/python2.2/site-packages/clubmask/database/database.py",
> line 216, in getDatabaseCacheDetail
> detail = self._shelf.get_db().cacheDetail()
> File "/usr/lib/python2.2/site-packages/ZODB/DB.py", line 183, in
> cacheDetail
> self._connectionMap(f)
> File "/usr/lib/python2.2/site-packages/ZODB/DB.py", line 151, in
> _connectionMap
> for cc in allocated: f(cc)
> File "/usr/lib/python2.2/site-packages/ZODB/DB.py", line 174, in f
> for oid, ob in con._cache.items():
> AttributeError: items
Ok -- bad Nic for self-replying. I was just cruising the ZODB cvs file
for cPickleCache and noticed the following diff. This fixes this problem
for me:
[root at brothel root]# diff -urN clean/ ZODB3-3.1.2b1
diff -urN clean/ZODB/cPickleCache.c ZODB3-3.1.2b1/ZODB/cPickleCache.c
--- clean/ZODB/cPickleCache.c Tue May 13 20:32:10 2003
+++ ZODB3-3.1.2b1/ZODB/cPickleCache.c Tue May 13 20:47:06 2003
@@ -710,7 +710,8 @@
return PyDict_Copy(self->data);
}
}
-
+ if (strcmp(name, "items") == 0)
+ return PyObject_GetAttrString(self->data, name);
return Py_FindMethod(cc_methods, (PyObject *)self, name);
}
--
Nicholas Henke
Penguin Herder & Linux Cluster System Programmer
Liniac Project - Univ. of Pennsylvania
More information about the ZODB-Dev
mailing list