url_file.py: remove the unnecessary str() wrapping around the hexdigest() (#34891)

remove the unnecessary str() wrapping around the hexdigest()
pull/34897/head
Dean Lee 1 month ago committed by GitHub
parent d1042df632
commit 5cffaf5bb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      tools/lib/url_file.py

@ -16,8 +16,7 @@ CHUNK_SIZE = 1000 * K
logging.getLogger("urllib3").setLevel(logging.WARNING) logging.getLogger("urllib3").setLevel(logging.WARNING)
def hash_256(link: str) -> str: def hash_256(link: str) -> str:
hsh = str(sha256((link.split("?")[0]).encode('utf-8')).hexdigest()) return sha256((link.split("?")[0]).encode('utf-8')).hexdigest()
return hsh
class URLFileException(Exception): class URLFileException(Exception):

Loading…
Cancel
Save