|
From: Nils D. <gma...@xo...> - 2004-01-20 18:30:23
|
Hi,
SQLObject 0.5.1 has an error when the connection uses "cache": None.
Calling destroySelf() on an object triggers this exception:
File "/home/nde/.www/pdms/Pages.py", line 542, in handleForm
self.obj.destroySelf()
File "/home/nde/dev/pdms/libs/SQLObject/SQLObject.py", line 1014, in
destroySelf
self._connection.cache.expire(self.id, self.__class__)
File "/home/nde/dev/pdms/libs/SQLObject/Cache.py", line 186, in expire
self.caches[cls.__name__].expire(id)
File "/home/nde/dev/pdms/libs/SQLObject/Cache.py", line 138, in expire
if self.cache.has_key(id):
AttributeError: 'CacheFactory' object has no attribute 'cache'
this small path fixes it for me:
--- Cache.py.old Tue Jan 20 18:31:51 2004
+++ Cache.py Tue Jan 20 18:31:57 2004
@@ -40,8 +40,7 @@
self.cullFraction = cullFraction
self.doCache = cache
- if self.doCache:
- self.cache = {}
+ self.cache = {}
self.expiredCache = {}
self.lock = threading.Lock()
Regards
Nils Decker
|