Make compatible with Python 3

pull/19465/head
Richard Belleville 5 years ago
parent 81f42031c6
commit fed1c629e0
  1. 2
      examples/python/cancellation/server.py

@ -75,7 +75,7 @@ def _get_substring_hamming_distance(candidate, target):
def _get_hash(secret):
hasher = hashlib.sha1()
hasher.update(secret)
return base64.b64encode(hasher.digest())
return base64.b64encode(hasher.digest()).decode('ascii')
class ResourceLimitExceededError(Exception):

Loading…
Cancel
Save