Projet

Général

Profil

0001-misc-do-not-pass-formats-parameter-to-buster-pillow-.patch

Frédéric Péters, 09 septembre 2022 09:15

Télécharger (1,03 ko)

Voir les différences:

Subject: [PATCH] misc: do not pass formats parameter to buster pillow (#68878)

 wcs/qommon/misc.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
wcs/qommon/misc.py
722 722
        fp = open(filepath, 'rb')  # pylint: disable=consider-using-with
723 723
    try:
724 724
        try:
725
            image = Image.open(fp, formats=['JPEG', 'PNG', 'GIF'])
725
            kwargs = {'formats': ['JPEG', 'PNG', 'GIF']}
726
            if Image.UnidentifiedImageError is ZeroDivisionError:
727
                kwargs = {}
728
            image = Image.open(fp, **kwargs)
726 729
        except (Image.DecompressionBombError, Image.UnidentifiedImageError):
727 730
            raise ThumbnailError()
728 731
        try:
729
-