Mercurial > hgrepos > Python > apps > py-cutils
diff cutils/util/digest.py @ 164:a813094ae4f5
Move PY2 from cutils.util.constants into cutils.util
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 09 Jan 2025 13:48:57 +0100 |
| parents | 1e5127028254 |
| children | 0f4febf646f5 |
line wrap: on
line diff
--- a/cutils/util/digest.py Thu Jan 09 13:40:33 2025 +0100 +++ b/cutils/util/digest.py Thu Jan 09 13:48:57 2025 +0100 @@ -19,6 +19,7 @@ mmap = None import stat +from . import PY2 from . import constants @@ -79,7 +80,7 @@ fadvise = getattr(os, "posix_fadvise", None) if fadvise: fadvise(fd, 0, 0, os.POSIX_FADV_SEQUENTIAL) - if not constants.PY2: + if not PY2: fileobj = io.FileIO(fd, mode="r", closefd=False) buf = bytearray(constants.READ_CHUNK_SIZE) with memoryview(buf) as full_view:
