Merge pull request #4303 from radarhere/exception

Updated exception documentation
This commit is contained in:
Hugo van Kemenade 2019-12-26 09:50:59 +02:00 committed by GitHub
commit bbaebe0d20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2687,8 +2687,9 @@ def open(fp, mode="r"):
and be opened in binary mode. and be opened in binary mode.
:param mode: The mode. If given, this argument must be "r". :param mode: The mode. If given, this argument must be "r".
:returns: An :py:class:`~PIL.Image.Image` object. :returns: An :py:class:`~PIL.Image.Image` object.
:exception IOError: If the file cannot be found, or the image cannot be :exception FileNotFoundError: If the file cannot be found.
opened and identified. :exception PIL.UnidentifiedImageError: If the image cannot be opened and
identified.
""" """
if mode != "r": if mode != "r":