Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/shasum.py @ 84:163de6dd6e05
Enhance comment and -- while being there -- fix a typo
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Wed, 20 Apr 2022 17:03:57 +0200 |
| parents | 05e2bf4796fd |
| children | d445534b80bb |
comparison
equal
deleted
inserted
replaced
| 83:05e2bf4796fd | 84:163de6dd6e05 |
|---|---|
| 526 if stat.S_ISREG(st[stat.ST_MODE]): | 526 if stat.S_ISREG(st[stat.ST_MODE]): |
| 527 filesize = st[stat.ST_SIZE] | 527 filesize = st[stat.ST_SIZE] |
| 528 else: | 528 else: |
| 529 use_mmap = False | 529 use_mmap = False |
| 530 if mmap is None or not use_mmap: | 530 if mmap is None or not use_mmap: |
| 531 # No mmmap available -> use traditional low-level file IO | 531 # No mmap available or wanted -> use traditional low-level file IO |
| 532 while True: | 532 while True: |
| 533 try: | 533 try: |
| 534 buf = os.read(fd, CHUNK_SIZE) | 534 buf = os.read(fd, CHUNK_SIZE) |
| 535 except OSError as e: | 535 except OSError as e: |
| 536 if e.errno not in (errno.EAGAIN, errno.EWOULDBLOCK, | 536 if e.errno not in (errno.EAGAIN, errno.EWOULDBLOCK, |
