summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorMickaël Schoentgen <contact@tiger-222.fr>2019-09-09 13:08:54 (GMT)
committerDino Viehland <dinoviehland@gmail.com>2019-09-09 13:08:54 (GMT)
commit992347d7376765fe3f4fc958fb1be193ba21f6c3 (patch)
treea4f56bf20ede8f3e607ad1192980231e21fdaba5 /Misc
parent1a8de82d3a30ecc7ed18a5ad51a0e17417ebfb89 (diff)
downloadcpython-992347d7376765fe3f4fc958fb1be193ba21f6c3.zip
cpython-992347d7376765fe3f4fc958fb1be193ba21f6c3.tar.gz
cpython-992347d7376765fe3f4fc958fb1be193ba21f6c3.tar.bz2
bpo-26185: Fix repr() on empty ZipInfo object (#13441)
* bpo-26185: Fix repr() on empty ZipInfo object It was failing on AttributeError due to inexistant but required attributes file_size and compress_size. They are now initialized to 0 in ZipInfo.__init__(). * Remove useless hasattr() in ZipInfo._open_to_write() * Completely remove file_size setting in _open_to_write().
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2019-05-20-14-17-29.bpo-26185.pQW4mI.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-05-20-14-17-29.bpo-26185.pQW4mI.rst b/Misc/NEWS.d/next/Library/2019-05-20-14-17-29.bpo-26185.pQW4mI.rst
new file mode 100644
index 0000000..dc71dae
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-05-20-14-17-29.bpo-26185.pQW4mI.rst
@@ -0,0 +1,2 @@
+Fix :func:`repr` on empty :class:`ZipInfo` object. Patch by Mickaël
+Schoentgen.