Raise exception when importing memcache error

Remove the exception handle and let the ImportError propagate out. This
will provide all of the information that a user would need to figure
out what's wrong.

Change-Id: I0e608ee15a0826e28dceb162d71d9a1191f0723d
Closes-bug: 1213660
This commit is contained in:
liyingjun 2014-04-15 23:17:07 +08:00
parent 74ae2713ba
commit 297d772b78
1 changed files with 2 additions and 5 deletions

View File

@ -36,11 +36,8 @@ def get_client(memcached_servers=None):
if not memcached_servers:
memcached_servers = CONF.memcached_servers
if memcached_servers:
try:
import memcache
client_cls = memcache.Client
except ImportError:
pass
import memcache
client_cls = memcache.Client
return client_cls(memcached_servers, debug=0)