Don't try to split a list of memcache servers

The memcache_servers configuration option is declared as a ListOpt,
but when used in AuthProtocol.__init__(), we treat it as a string
to be split on ',', which is wrong.  Remove the .split().

No test is added because the memcache package may not be installed,
and I cannot see an easy method to only test this clause if it is
available.

Fixes bug 1086125.

Change-Id: Ifb0a18017d2407b3ccb2188b1a704c26997ba594
This commit is contained in:
Kevin L. Mitchell
2012-12-03 14:24:38 -06:00
parent 94cbb61663
commit 6b72fb626a

View File

@@ -268,7 +268,7 @@ class AuthProtocol(object):
import memcache
import iso8601
LOG.info('Using memcache for caching token')
self._cache = memcache.Client(memcache_servers.split(','))
self._cache = memcache.Client(memcache_servers)
self._iso8601 = iso8601
except ImportError as e:
LOG.warn('disabled caching due to missing libraries %s', e)