Fix unicode key of azcache can't be stored to memcache

The memcache library we are using assumes all strings passed to
it are plain ascii, so we need to convert unicode to string.

Fix bug #1212164

Change-Id: Ibf36e6b096893cb9f056371bb43cbb441cae6e32
This commit is contained in:
Yaguang Tang
2013-08-14 17:23:12 +08:00
parent 4e983aaab7
commit 6e047e0b87
2 changed files with 11 additions and 1 deletions

View File

@@ -56,7 +56,7 @@ def _reset_cache():
def _make_cache_key(host):
return "azcache-%s" % host
return "azcache-%s" % host.encode('utf-8')
def set_availability_zones(context, services):