From 130139dc80c7b4353c9a4383c1e69dcd87a4f2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannig=20Perr=C3=A9?= Date: Mon, 2 Nov 2015 21:32:49 +0100 Subject: [PATCH] Fix unicode issue introduced by previous commit. --- lib/ansible/template/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py index 1f41fcee7b1..67a08f16447 100644 --- a/lib/ansible/template/__init__.py +++ b/lib/ansible/template/__init__.py @@ -310,7 +310,7 @@ class Templar: return C.DEFAULT_NULL_REPRESENTATION # Using a cache in order to prevent template calls with already templated variables - sha1_hash = sha1(variable + str(preserve_trailing_newlines) + str(escape_backslashes) + str(fail_on_undefined) + str(overrides)).hexdigest() + sha1_hash = sha1(variable.encode('utf-8') + str(preserve_trailing_newlines) + str(escape_backslashes) + str(fail_on_undefined) + str(overrides)).hexdigest() if sha1_hash in self._cached_result: result = self._cached_result[sha1_hash] else: