From 7a1ff946cd2abf5cc4ca2873dd2553eacc739ac5 Mon Sep 17 00:00:00 2001 From: Jimmy Berry Date: Wed, 15 May 2019 21:00:11 -0500 Subject: [PATCH] osclib/util: sha1_short(): encode data as utf-8 [python3]. --- osclib/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osclib/util.py b/osclib/util.py index 50d20a48..c6164da8 100644 --- a/osclib/util.py +++ b/osclib/util.py @@ -159,4 +159,4 @@ def sha1_short(data): if isinstance(data, list): data = '::'.join(data) - return hashlib.sha1(data).hexdigest()[:7] + return hashlib.sha1(data.encode('utf-8')).hexdigest()[:7]