Encode the input to hashlib

Another python3-ism.

Change-Id: Ide54c16fd75b1e06b45a926b771d65575d50ca2e
This commit is contained in:
Monty Taylor 2020-03-25 14:47:56 -05:00
parent b6401b0f2f
commit 80b1e15236
1 changed files with 1 additions and 1 deletions

View File

@ -457,7 +457,7 @@ def main():
acl_cache = {}
for acl_file in glob.glob(os.path.join(ACL_DIR, '*/*.config')):
sha256 = hashlib.sha256()
sha256.update(open(acl_file, 'r').read())
sha256.update(open(acl_file, 'r').read().encode('utf-8'))
acl_cache[acl_file] = sha256.hexdigest()
gerrit = gerritlib.gerrit.Gerrit(GERRIT_HOST,