mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 08:48:46 -03:30
handle unicode host names in fact cache
This commit is contained in:
@@ -57,10 +57,10 @@ class CacheModule(BaseCacheModule):
|
||||
return '{}'.format(self._inventory_id)
|
||||
|
||||
def translate_host_key(self, host_name):
|
||||
return '{}-{}'.format(self._inventory_id, base64.b64encode(host_name))
|
||||
return '{}-{}'.format(self._inventory_id, base64.b64encode(host_name.encode('utf-8')))
|
||||
|
||||
def translate_modified_key(self, host_name):
|
||||
return '{}-{}-modified'.format(self._inventory_id, base64.b64encode(host_name))
|
||||
return '{}-{}-modified'.format(self._inventory_id, base64.b64encode(host_name.encode('utf-8')))
|
||||
|
||||
def get(self, key):
|
||||
host_key = self.translate_host_key(key)
|
||||
|
||||
Reference in New Issue
Block a user