[Erp5-report] r18067 - /erp5/trunk/products/ERP5Type/Tool/MemcachedTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Dec 6 17:48:44 CET 2007
Author: vincent
Date: Thu Dec 6 17:48:44 2007
New Revision: 18067
URL: http://svn.erp5.org?rev=18067&view=rev
Log:
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.
Modified:
erp5/trunk/products/ERP5Type/Tool/MemcachedTool.py
Modified: erp5/trunk/products/ERP5Type/Tool/MemcachedTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/MemcachedTool.py?rev=18067&r1=18066&r2=18067&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/MemcachedTool.py (original)
+++ erp5/trunk/products/ERP5Type/Tool/MemcachedTool.py Thu Dec 6 17:48:44 2007
@@ -266,9 +266,8 @@
Return used memcached dict.
Create it if does not exist.
"""
- try:
- dictionary = self._v_memcached_dict
- except AttributeError:
+ dictionary = getattr(self, '_v_memcached_dict', None)
+ if dictionary is None:
dictionary = MemcachedDict(self.getServerAddressList())
self._v_memcached_dict = dictionary
return dictionary
More information about the Erp5-report
mailing list