Showing
2 changed files
with
3 additions
and
3 deletions
... | @@ -137,7 +137,7 @@ class Function(object): | ... | @@ -137,7 +137,7 @@ class Function(object): |
137 | m = hashlib.md5() | 137 | m = hashlib.md5() |
138 | with open(self.zipfile_name, 'rb') as fp: | 138 | with open(self.zipfile_name, 'rb') as fp: |
139 | m.update(fp.read()) | 139 | m.update(fp.read()) |
140 | - zip_md5 = m.hexdigest() | 140 | + zip_md5 = m.hexdigest().encode('utf-8') |
141 | cached_md5 = self._context.get_cache_value('zip_md5') | 141 | cached_md5 = self._context.get_cache_value('zip_md5') |
142 | LOG.debug('zip_md5: %s', zip_md5) | 142 | LOG.debug('zip_md5: %s', zip_md5) |
143 | LOG.debug('cached md5: %s', cached_md5) | 143 | LOG.debug('cached md5: %s', cached_md5) |
... | @@ -158,7 +158,7 @@ class Function(object): | ... | @@ -158,7 +158,7 @@ class Function(object): |
158 | m.update(str(self.memory_size)) | 158 | m.update(str(self.memory_size)) |
159 | m.update(self._context.exec_role_arn) | 159 | m.update(self._context.exec_role_arn) |
160 | m.update(str(self.timeout)) | 160 | m.update(str(self.timeout)) |
161 | - config_md5 = m.hexdigest() | 161 | + config_md5 = m.hexdigest().encode('utf-8') |
162 | cached_md5 = self._context.get_cache_value('config_md5') | 162 | cached_md5 = self._context.get_cache_value('config_md5') |
163 | LOG.debug('config_md5: %s', config_md5) | 163 | LOG.debug('config_md5: %s', config_md5) |
164 | LOG.debug('cached_md5: %s', cached_md5) | 164 | LOG.debug('cached_md5: %s', cached_md5) | ... | ... |
... | @@ -125,7 +125,7 @@ class Policy(object): | ... | @@ -125,7 +125,7 @@ class Policy(object): |
125 | def _check_md5(self, document): | 125 | def _check_md5(self, document): |
126 | m = hashlib.md5() | 126 | m = hashlib.md5() |
127 | m.update(document.encode('utf-8')) | 127 | m.update(document.encode('utf-8')) |
128 | - policy_md5 = m.hexdigest() | 128 | + policy_md5 = m.hexdigest().encode('utf-8') |
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) |
131 | LOG.debug('cached md5: %s', cached_md5) | 131 | LOG.debug('cached md5: %s', cached_md5) | ... | ... |
-
Please register or login to post a comment