Skip to content

Commit c7094a5

Browse files
committed
Handle PIL constant renaming (LANCZOS -> Resampling.LANCZOS)
1 parent 6ef9d4f commit c7094a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

emailproxy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
__author__ = 'Simon Robinson'
77
__copyright__ = 'Copyright (c) 2024 Simon Robinson'
88
__license__ = 'Apache 2.0'
9-
__version__ = '2024-03-15' # ISO 8601 (YYYY-MM-DD)
9+
__version__ = '2024-05-22' # ISO 8601 (YYYY-MM-DD)
1010
__package_version__ = '.'.join([str(int(i)) for i in __version__.split('-')]) # for pyproject.toml usage only
1111

1212
import abc
@@ -2631,7 +2631,7 @@ def create_icon(self):
26312631
pillow_version = pkg_resources.get_distribution('pillow').version
26322632
if pkg_resources.parse_version(pystray_version) <= pkg_resources.parse_version('0.19.4') and \
26332633
pkg_resources.parse_version(pillow_version) >= pkg_resources.parse_version('10.0.0'):
2634-
Image.ANTIALIAS = Image.LANCZOS
2634+
Image.ANTIALIAS = Image.LANCZOS if hasattr(Image, 'LANCZOS') else Image.Resampling.LANCZOS
26352635
icon_class = RetinaIcon if sys.platform == 'darwin' else pystray.Icon
26362636
return icon_class(APP_NAME, App.get_image(), APP_NAME, menu=pystray.Menu(
26372637
pystray.MenuItem('Servers and accounts', pystray.Menu(self.create_config_menu)),

0 commit comments

Comments
 (0)