From 5e4a0e45a3274d0304c23a4c9f8f6e352d9230ea Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Fri, 22 Nov 2019 14:59:22 +0100 Subject: [PATCH] don't redefine `hash` built-in Signed-off-by: Nils Philippsen --- distgit_bugzilla_sync/package_summaries.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distgit_bugzilla_sync/package_summaries.py b/distgit_bugzilla_sync/package_summaries.py index 6c03ed7..7166a3b 100644 --- a/distgit_bugzilla_sync/package_summaries.py +++ b/distgit_bugzilla_sync/package_summaries.py @@ -82,11 +82,11 @@ def needs_update(local_file, remote_sha, sha_type): if sha_type == 'sha': sha_type = 'sha1' - hash = getattr(hashlib, sha_type)() + hashobj = getattr(hashlib, sha_type)() with open(local_file, 'rb') as f: - hash.update(f.read()) + hashobj.update(f.read()) - local_sha = hash.hexdigest() + local_sha = hashobj.hexdigest() if local_sha != remote_sha: return True