Home | History | Annotate | Download | only in python2.7

Lines Matching defs:errors

226 def uts(s, encoding, errors):
229 if errors == "utf-8":
244 return s.encode(encoding, errors)
330 """General exception for extract errors."""
342 """Base exception for header errors."""
960 def get_info(self, encoding, errors):
984 info[key] = info[key].encode(encoding, errors)
988 def tobuf(self, format=DEFAULT_FORMAT, encoding=ENCODING, errors="strict"):
991 info = self.get_info(encoding, errors)
998 return self.create_pax_header(info, encoding, errors)
1029 def create_pax_header(self, info, encoding, errors):
1047 val = info[name].decode(encoding, errors)
1281 self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors)
1407 next._apply_pax_info(pax_headers, tarfile.encoding, tarfile.errors)
1421 def _apply_pax_info(self, pax_headers, encoding, errors):
1438 value = uts(value, encoding, errors)
1487 errorlevel = 1 # If 0, fatal errors only appear in debug
1488 # messages (if debug >= 0). If > 0, errors
1495 errors = None # Error handler for unicode conversion.
1503 errors=None, pax_headers=None, debug=None, errorlevel=None):
1545 if errors is not None:
1546 self.errors = errors
1548 self.errors = "utf-8"
1550 self.errors = "strict"
2014 buf = tarinfo.tobuf(self.format, self.encoding, self.errors)