Commit f8dffeb3 authored by Nicolas Delaby's avatar Nicolas Delaby

memcached_dict_pool must be available even if memcache is not installed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28128 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 775cbde1
...@@ -50,7 +50,7 @@ def encodeKey(key): ...@@ -50,7 +50,7 @@ def encodeKey(key):
# ascii table. Just strip them here to avoid the raise. # ascii table. Just strip them here to avoid the raise.
return ''.join([x for x in key if ord(x) > \ return ''.join([x for x in key if ord(x) > \
MEMCACHED_MINIMUM_KEY_CHAR_ORD]) MEMCACHED_MINIMUM_KEY_CHAR_ORD])
memcached_dict_pool = local()
if memcache is not None: if memcache is not None:
# Real memcache tool # Real memcache tool
import memcache import memcache
...@@ -64,8 +64,6 @@ if memcache is not None: ...@@ -64,8 +64,6 @@ if memcache is not None:
DELETE_ACTION = 'delete' DELETE_ACTION = 'delete'
MEMCACHED_MINIMUM_KEY_CHAR_ORD = ord(' ') MEMCACHED_MINIMUM_KEY_CHAR_ORD = ord(' ')
memcached_dict_pool = local()
class MemcachedDict(TM): class MemcachedDict(TM):
""" """
Present memcached similarly to a dictionary (not all method are Present memcached similarly to a dictionary (not all method are
......
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