Add type annotations

This commit is contained in:
Emma Nora Theuer 2024-12-30 03:39:07 +01:00
parent 488142eede
commit d1d0e7c969

View file

@ -1,4 +1,4 @@
from os import getenv, chdir from os import chdir
import logging import logging
# Use logger that is also in wallman_lib # Use logger that is also in wallman_lib
logger = logging.getLogger("wallman") logger = logging.getLogger("wallman")
@ -36,7 +36,7 @@ def on_quit(icon, item, shutdown_scheduler):
chdir("/etc/wallman/icons/") chdir("/etc/wallman/icons/")
try: try:
icon_image = Image.open("systrayIcon.jpg") icon_image: Image.Image = Image.open("systrayIcon.jpg")
except FileNotFoundError: except FileNotFoundError:
logger.error("~/.config/wallman/systrayIcon.jpg has not been found, wallman will launch without a systray.") logger.error("/etc/wallman/icons/systrayIcon.jpg has not been found, wallman will launch without a systray.")
print("~/.config/wallman/systrayIcon.jpg has not been found, wallman will launch without a systray.") print("ERROR: /etc/wallman/icons/systrayIcon.jpg has not been found, wallman will launch without a systray.")