diff options
author | Maxim Devaev <[email protected]> | 2021-12-23 20:56:16 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2021-12-23 20:56:16 +0300 |
commit | 1e98d9bd5d63270e17d2b8cddd5820114c355aed (patch) | |
tree | e2fec1979c4a22800a49deaad5188eb87b77f00f /kvmd/apps/vnc/render.py | |
parent | aef7a5a094853972cbe1ce9127ad1a546ea7f2ab (diff) |
python 3.10
Diffstat (limited to 'kvmd/apps/vnc/render.py')
-rw-r--r-- | kvmd/apps/vnc/render.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kvmd/apps/vnc/render.py b/kvmd/apps/vnc/render.py index 72b28e6e..fc07a2a9 100644 --- a/kvmd/apps/vnc/render.py +++ b/kvmd/apps/vnc/render.py @@ -49,5 +49,7 @@ def _inner_make_text_jpeg(width: int, height: int, quality: int, text: str) -> b @functools.lru_cache() def _get_font() -> ImageFont.FreeTypeFont: - path = os.path.join(os.path.dirname(sys.modules[__name__].__file__), "fonts", "Azbuka04.ttf") + module_path = sys.modules[__name__].__file__ + assert module_path is not None + path = os.path.join(os.path.dirname(module_path), "fonts", "Azbuka04.ttf") return ImageFont.truetype(path, size=20) |