[Erp5-report] r11116 - in /erp5/trunk/products/ERP5Type: CachePlugins/ Tool/
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Nov 6 13:21:16 CET 2006
Author: ivan
Date: Mon Nov 6 13:21:07 2006
New Revision: 11116
URL: http://svn.erp5.org?rev=11116&view=rev
Log:
Fixed some dirty code.
Modified:
erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py
erp5/trunk/products/ERP5Type/Tool/CacheTool.py
Modified: erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py?rev=11116&r1=11115&r2=11116&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py Mon Nov 6 13:21:07 2006
@@ -63,7 +63,7 @@
except ImportError:
request = None
- if request:
+ if request is not None:
## Zope/ERP5 environment
memcache_conn = request.get('_erp5_memcache_connection', None)
if not memcache_conn:
Modified: erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py?rev=11116&r1=11115&r2=11116&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/SQLCache.py Mon Nov 6 13:21:07 2006
@@ -124,7 +124,7 @@
except ImportError:
request = None
- if request:
+ if request is not None:
## Zope/ERP5 environment
dbConn = request.get('_erp5_dbcache_connection', None)
if not dbConn:
Modified: erp5/trunk/products/ERP5Type/Tool/CacheTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/CacheTool.py?rev=11116&r1=11115&r2=11116&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/CacheTool.py (original)
+++ erp5/trunk/products/ERP5Type/Tool/CacheTool.py Mon Nov 6 13:21:07 2006
@@ -110,7 +110,7 @@
except:
pass
self.erp5_sql_transactionless_connection.manage_test(my_query)
- if REQUEST:
+ if REQUEST is not None:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache table successfully created.')
security.declareProtected(Permissions.AccessContentsInformation, 'parseDBConnectionString')
@@ -169,7 +169,7 @@
for key,item in self.getCacheFactoryList().items():
if len(item['cache_plugins'])!=0:
CachingMethod.factories[key] = CacheFactory(item['cache_plugins'], item['cache_params'])
- if REQUEST:
+ if REQUEST is not None:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache updated.')
security.declareProtected(Permissions.ModifyPortalContent, 'clearCache')
@@ -179,7 +179,7 @@
for cf in ram_cache_root:
for cp in ram_cache_root[cf].getCachePluginList():
cp.clearCache()
- if REQUEST:
+ if REQUEST is not None:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache cleared.')
security.declareProtected(Permissions.ModifyPortalContent, 'clearCacheFactory')
@@ -188,7 +188,7 @@
ram_cache_root = self.getRamCacheRoot()
if ram_cache_root.has_key(cache_factory_id):
ram_cache_root[cache_factory_id].clearCache()
- if REQUEST:
+ if REQUEST is not None:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache factory %s cleared.' %cache_factory_id)
security.declareProtected(Permissions.ModifyPortalContent, 'clearCacheFactoryScope')
@@ -197,6 +197,6 @@
ram_cache_root = self.getRamCacheRoot()
if ram_cache_root.has_key(cache_factory_id):
ram_cache_root[cache_factory_id].clearCacheForScope(scope)
- if REQUEST:
+ if REQUEST is not None:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache factory scope %s cleared.' %cache_factory_id)
More information about the Erp5-report
mailing list