From ca0209d194fe6abe99a614f4ffa6cfb83c85bcf3 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 26 Dec 2019 13:16:49 +1100 Subject: [PATCH] Updated exception documentation [ci skip] --- src/PIL/Image.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 24687d06f..41e9c9fe8 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2687,8 +2687,9 @@ def open(fp, mode="r"): and be opened in binary mode. :param mode: The mode. If given, this argument must be "r". :returns: An :py:class:`~PIL.Image.Image` object. - :exception IOError: If the file cannot be found, or the image cannot be - opened and identified. + :exception FileNotFoundError: If the file cannot be found. + :exception PIL.UnidentifiedImageError: If the image cannot be opened and + identified. """ if mode != "r":