From 41edb775780f70fb8ec8658e13a5076d07ff7ea2 Mon Sep 17 00:00:00 2001 From: JezerM Date: Wed, 15 Sep 2021 12:17:17 -0600 Subject: [PATCH] Bugfixes with Python 3.8 --- web-greeter/setup.py | 1 + web-greeter/utils/screensaver.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web-greeter/setup.py b/web-greeter/setup.py index e0afeba..c94db02 100644 --- a/web-greeter/setup.py +++ b/web-greeter/setup.py @@ -23,6 +23,7 @@ setup( options = {"build_exe": { "build_exe": "dist", "packages": ["gi", "Xlib"], + "includes": ["gi"], "silent_level": 0, }}, ) diff --git a/web-greeter/utils/screensaver.py b/web-greeter/utils/screensaver.py index 6d339f8..6cafc59 100644 --- a/web-greeter/utils/screensaver.py +++ b/web-greeter/utils/screensaver.py @@ -1,11 +1,11 @@ from logger import logger from Xlib.display import Display -saved_data: dict[str, int] +saved_data: dict = {} saved = False available = False -display = None +display: Display def init_display(): global display, available @@ -20,6 +20,7 @@ def set_screensaver(timeout: int): if saved or not available: return display.sync() + display.sync() data: dict[str, int] = display.get_screen_saver()._data or {} saved_data = data saved = True