Commit 171b5de1 authored by Vincent Pelletier's avatar Vincent Pelletier

When server address is changed, None value is set in the volatile, in which...

When server address is changed, None value is set in the volatile, in which case old code returned None. Now, check for None value and reinstanciate if needed.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18067 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dd9ac07b
...@@ -266,9 +266,8 @@ if memcache is not None: ...@@ -266,9 +266,8 @@ if memcache is not None:
Return used memcached dict. Return used memcached dict.
Create it if does not exist. Create it if does not exist.
""" """
try: dictionary = getattr(self, '_v_memcached_dict', None)
dictionary = self._v_memcached_dict if dictionary is None:
except AttributeError:
dictionary = MemcachedDict(self.getServerAddressList()) dictionary = MemcachedDict(self.getServerAddressList())
self._v_memcached_dict = dictionary self._v_memcached_dict = dictionary
return dictionary return dictionary
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment