From KeyError to ValueError when saving image

When saving an image, if the extension is not determined it raises a ValueError (while internally it manages a KeyError) so I propose this change
This commit is contained in:
Giovanni Cavallin 2018-09-11 10:30:42 +02:00 committed by Andrew Murray
parent 37f0e9595c
commit e5160bd373

View File

@ -1894,7 +1894,7 @@ class Image(object):
parameter should always be used.
:param params: Extra parameters to the image writer.
:returns: None
:exception KeyError: If the output format could not be determined
:exception ValueError: If the output format could not be determined
from the file name. Use the format option to solve this.
:exception IOError: If the file could not be written. The file
may have been created, and may contain partial data.