aboutsummaryrefslogtreecommitdiffstats
path: root/tests/importer_tests.py
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2012-12-11 21:16:22 +0000
committerBryn M. Reeves <bmr@redhat.com>2012-12-11 21:16:22 +0000
commitb5ed2bc6d592d36343f8b7ea790ab932f6e2a81e (patch)
treecad59c5d2a9683e56d334d3d1a3096b1762df517 /tests/importer_tests.py
parent1a0c39917ebc7c1636b702a6a6a0719b72795864 (diff)
downloadsos-b5ed2bc6d592d36343f8b7ea790ab932f6e2a81e.tar.gz
Fix regression TarFileArchive regression
Commit 179d9bb introduced a regression in the TarFileArchive class: (Pdb) bt /usr/sbin/sosreport(23)<module>() -> main(sys.argv[1:]) /usr/lib/python2.7/site-packages/sos/sosreport.py(908)main() -> sos.execute() /usr/lib/python2.7/site-packages/sos/sosreport.py(901)execute() -> return self.final_work() /usr/lib/python2.7/site-packages/sos/sosreport.py(773)final_work() -> self._finish_logging() /usr/lib/python2.7/site-packages/sos/sosreport.py(376)_finish_logging() -> self.archive.add_file(self.sos_log_file.name, dest=os.path.join('sos_logs', 'sos.log')) /usr/lib/python2.7/site-packages/sos/utilities.py(280)add_file() -> self.tarfile.addfile(tar_info, fileobj) /usr/lib64/python2.7/tarfile.py(2015)addfile() -> buf = tarinfo.tobuf(self.format, self.encoding, self.errors) /usr/lib64/python2.7/tarfile.py(996)tobuf() -> return self.create_gnu_header(info) /usr/lib64/python2.7/tarfile.py(1027)create_gnu_header() -> return buf + self._create_header(info, GNU_FORMAT) /usr/lib64/python2.7/tarfile.py(1112)_create_header() -> itn(info.get("mtime", 0), 12, format), > /usr/lib64/python2.7/tarfile.py(212)itn() -> raise ValueError("overflow in number field") The tarinfo mtime field is a float but the pax headers take a string-encoded value. The tarinfo field was inadvertently converted to a formatted string. The problem is hard to track down because it's not always triggered; the bug depends on the value of the string-encoded mtime date.
Diffstat (limited to 'tests/importer_tests.py')
0 files changed, 0 insertions, 0 deletions