From fed1c629e06f15ed063a44edcb4ce7717bdec569 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 25 Jun 2019 16:07:49 -0700 Subject: [PATCH] Make compatible with Python 3 --- examples/python/cancellation/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/cancellation/server.py b/examples/python/cancellation/server.py index 46e7b88ce51..767337ea3ea 100644 --- a/examples/python/cancellation/server.py +++ b/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):