Round up a byte count by BLOCKSIZE and return it, e.g. _block(834) => 1024.
(self, count)
| 1644 | return value.decode(fallback_encoding, fallback_errors) |
| 1645 | |
| 1646 | def _block(self, count): |
| 1647 | """Round up a byte count by BLOCKSIZE and return it, |
| 1648 | e.g. _block(834) => 1024. |
| 1649 | """ |
| 1650 | # Only non-negative offsets are allowed |
| 1651 | if count < 0: |
| 1652 | raise InvalidHeaderError("invalid offset") |
| 1653 | blocks, remainder = divmod(count, BLOCKSIZE) |
| 1654 | if remainder: |
| 1655 | blocks += 1 |
| 1656 | return blocks * BLOCKSIZE |
| 1657 | |
| 1658 | def isreg(self): |
| 1659 | 'Return True if the Tarinfo object is a regular file.' |
no test coverage detected