Skip to content

Commit

Permalink
Convert host value from unicode to a string.
Browse files Browse the repository at this point in the history
The memcached API expects string format, not unicode.
Convert the host value to a string before creating
the cache_key and passing it to memcached.

Fixes: bug #1158958
Change-Id: I26e86b7fb61b4b3380a14686bd2faa9f58017999
  • Loading branch information
Dan Florea committed Mar 28, 2013
1 parent e9912c6 commit a11c41b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -37,7 +37,7 @@ def __init__(self):
self.mc = memorycache.get_client()

def _get_host_az(self, context, instance):
host = instance.get('host')
host = str(instance.get('host'))
if not host:
return None
cache_key = "azcache-%s" % host
Expand Down

0 comments on commit a11c41b

Please sign in to comment.