diff options
author | Zackery Spytz <zspytz@gmail.com> | 2019-05-13 07:50:52 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-05-13 07:50:52 (GMT) |
commit | cf599f6f6f1c392d8f12936982a370d533782195 (patch) | |
tree | da53ae10a41332d3e52c38cd3603c36dcb4329cd /Doc/library | |
parent | d28772ab6967fea136c0707f0207673ebad66f61 (diff) | |
download | cpython-cf599f6f6f1c392d8f12936982a370d533782195.zip cpython-cf599f6f6f1c392d8f12936982a370d533782195.tar.gz cpython-cf599f6f6f1c392d8f12936982a370d533782195.tar.bz2 |
bpo-6584: Add a BadGzipFile exception to the gzip module. (GH-13022)
Co-Authored-By: Filip Gruszczyński <gruszczy@gmail.com>
Co-Authored-By: Michele Orrù <maker@tumbolandia.net>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/gzip.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst index 8850a33..3349a94 100644 --- a/Doc/library/gzip.rst +++ b/Doc/library/gzip.rst @@ -59,6 +59,14 @@ The module defines the following items: .. versionchanged:: 3.6 Accepts a :term:`path-like object`. +.. exception:: BadGzipFile + + An exception raised for invalid gzip files. It inherits :exc:`OSError`. + :exc:`EOFError` and :exc:`zlib.error` can also be raised for invalid gzip + files. + + .. versionadded:: 3.8 + .. class:: GzipFile(filename=None, mode=None, compresslevel=9, fileobj=None, mtime=None) Constructor for the :class:`GzipFile` class, which simulates most of the |