Mitch Garnaat

Encode the JSON document coming out of dumps().

...@@ -124,7 +124,7 @@ class Policy(object): ...@@ -124,7 +124,7 @@ class Policy(object):
124 124
125 def _check_md5(self, document): 125 def _check_md5(self, document):
126 m = hashlib.md5() 126 m = hashlib.md5()
127 - m.update(document) 127 + m.update(document.encode('utf-8'))
128 policy_md5 = m.hexdigest() 128 policy_md5 = m.hexdigest()
129 cached_md5 = self._context.get_cache_value('policy_md5') 129 cached_md5 = self._context.get_cache_value('policy_md5')
130 LOG.debug('policy_md5: %s', policy_md5) 130 LOG.debug('policy_md5: %s', policy_md5)
......