MCPcopy Index your code
hub / github.com/python/cpython / _decode_pax_field

Method _decode_pax_field

Lib/tarfile.py:1657–1663  ·  view source on GitHub ↗

Decode a single field from a pax record.

(self, value, encoding, fallback_encoding, fallback_errors)

Source from the content-addressed store, hash-verified

1655 self.pax_headers = pax_headers.copy()
1656
1657 def _decode_pax_field(self, value, encoding, fallback_encoding, fallback_errors):
1658 """Decode a single field from a pax record.
1659 """
1660 try:
1661 return value.decode(encoding, "strict")
1662 except UnicodeDecodeError:
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,

Callers 1

_proc_paxMethod · 0.95

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected