Round up a byte count by BLOCKSIZE and return it, e.g. _block(834) => 1024.
(self, count)
| 1663 | return value.decode(fallback_encoding, fallback_errors) |
| 1664 | |
| 1665 | def _block(self, count): |
| 1666 | """Round up a byte count by BLOCKSIZE and return it, |
| 1667 | e.g. _block(834) => 1024. |
| 1668 | """ |
| 1669 | # Only non-negative offsets are allowed |
| 1670 | if count < 0: |
| 1671 | raise InvalidHeaderError("invalid offset") |
| 1672 | blocks, remainder = divmod(count, BLOCKSIZE) |
| 1673 | if remainder: |
| 1674 | blocks += 1 |
| 1675 | return blocks * BLOCKSIZE |
| 1676 | |
| 1677 | def isreg(self): |
| 1678 | 'Return True if the Tarinfo object is a regular file.' |
no test coverage detected