[Erp5-report] r28903 - /erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 10 17:15:32 CEST 2009
Author: nicolas
Date: Thu Sep 10 17:15:30 2009
New Revision: 28903
URL: http://svn.erp5.org?rev=28903&view=rev
Log:
If connexion is closed, even get_stats may failed
Modified:
erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
Modified: erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py?rev=28903&r1=28902&r2=28903&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py [utf8] Thu Sep 10 17:15:30 2009
@@ -79,7 +79,10 @@
memcache_conn = connection_pool.get(thread_id, None)
if memcache_conn is not None:
- stats = memcache_conn.get_stats()
+ try:
+ stats = memcache_conn.get_stats()
+ except IndexError:
+ stats = ()
if not len(stats) or not len(stats[0][1]):
# create a new connection if the existing connection seems
# dead.
More information about the Erp5-report
mailing list