view mercurial/utils/hashutil.py @ 51831:34eb3a711955 default tip

http: simplify
author Joerg Sonnenberger <joerg@bec.de>
date Sun, 30 Jun 2024 16:02:50 +0200
parents 6000f5b25c9b
children
line wrap: on
line source

import hashlib

try:
    from ..thirdparty import sha1dc  # pytype: disable=import-error

    sha1 = sha1dc.sha1
except (ImportError, AttributeError):
    sha1 = hashlib.sha1