From 3a658198ac1a9da14d200e1c90285b938bd8ef3a Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 13 Apr 2026 14:18:37 +0200 Subject: [PATCH] Cleanup --- sbapp/compat.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbapp/compat.py b/sbapp/compat.py index 94864d3..b6e3624 100644 --- a/sbapp/compat.py +++ b/sbapp/compat.py @@ -29,7 +29,11 @@ def python314_kivy_patch(): contents = None target_path = f"{spec.submodule_search_locations[0]}/lang/parser.py" - with open(target_path, "rb") as fh: contents = fh.read().decode("utf-8") + try: + with open(target_path, "rb") as fh: contents = fh.read().decode("utf-8") + except Exception as e: + print(f"Error while reading Kivy's lang parser file: {e}") + if not contents: fail_patch() contents = contents.replace("\r\n", "\n")