mercurial/utils/hashutil.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 30 Aug 2023 14:38:30 +0200
changeset 50899 d28cc52e2c0f
parent 48875 6000f5b25c9b
child 51863 f4733654f144
permissions -rw-r--r--
relink: use sysstr to check for attribute presence We do not need bytes here.

import hashlib

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

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