issue22046: mention that zipfile can raise NotImplementedError on unsupported

compression algorithms.
This commit is contained in:
Gregory P. Smith 2015-04-14 10:02:49 -07:00
commit 6eda1be83c
1 changed files with 5 additions and 1 deletions

View File

@ -300,7 +300,11 @@ ZipFile Objects
file in the archive, or a :class:`ZipInfo` object. The archive must be open for file in the archive, or a :class:`ZipInfo` object. The archive must be open for
read or append. *pwd* is the password used for encrypted files and, if specified, read or append. *pwd* is the password used for encrypted files and, if specified,
it will override the default password set with :meth:`setpassword`. Calling it will override the default password set with :meth:`setpassword`. Calling
:meth:`read` on a closed ZipFile will raise a :exc:`RuntimeError`. :meth:`read` on a closed ZipFile will raise a :exc:`RuntimeError`. Calling
:meth:`read` on a ZipFile that uses a compression method other than
:const:`ZIP_STORED`, :const:`ZIP_DEFLATED`, :const:`ZIP_BZIP2` or
:const:`ZIP_LZMA` will raise a :exc:`NotImplementedError`. An error will also
be raised if the corresponding compression module is not available.
.. method:: ZipFile.testzip() .. method:: ZipFile.testzip()