summaryrefslogtreecommitdiff
path: root/py_modules/lsfg_vk/config_schema.py
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-10-19 11:55:54 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-10-19 11:55:54 -0400
commitcecbefc71eacf8ae61a36bbb7fe06eb8c1fa03c6 (patch)
treeb3f09b029d9ccd2655c05888759d9be3477780ff /py_modules/lsfg_vk/config_schema.py
parentf076064a9c064a7e2ca74be013e2174aec8a0a1e (diff)
downloaddecky-lsfg-vk-cecbefc71eacf8ae61a36bbb7fe06eb8c1fa03c6.tar.gz
decky-lsfg-vk-cecbefc71eacf8ae61a36bbb7fe06eb8c1fa03c6.zip
chore: clean up imports, rm dupe inits, bump ver
Diffstat (limited to 'py_modules/lsfg_vk/config_schema.py')
-rw-r--r--py_modules/lsfg_vk/config_schema.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/py_modules/lsfg_vk/config_schema.py b/py_modules/lsfg_vk/config_schema.py
index 66aeb69..807c798 100644
--- a/py_modules/lsfg_vk/config_schema.py
+++ b/py_modules/lsfg_vk/config_schema.py
@@ -8,6 +8,7 @@ This module defines the complete configuration structure for lsfg-vk, managing T
- Type definitions
"""
+import logging
import re
import sys
from typing import TypedDict, Dict, Any, Union, cast, List
@@ -124,9 +125,9 @@ class ConfigurationManager:
dll_result = dll_detection_service.check_lossless_scaling_dll()
if dll_result.get("detected") and dll_result.get("path"):
defaults["dll"] = dll_result["path"]
- except Exception:
+ except (OSError, IOError, KeyError, TypeError) as e:
# If detection fails, keep empty default
- pass
+ logging.getLogger(__name__).debug(f"DLL detection failed: {e}")
# If DLL path is still empty, use a reasonable fallback
if not defaults["dll"]:
@@ -403,8 +404,9 @@ class ConfigurationManager:
global_config=global_config
)
- except Exception:
+ except (ValueError, KeyError, TypeError, AttributeError) as e:
# If parsing fails completely, return default profile structure
+ logging.getLogger(__name__).warning(f"Failed to parse TOML profiles, using defaults: {e}")
return ProfileData(
current_profile=DEFAULT_PROFILE_NAME,
profiles={DEFAULT_PROFILE_NAME: ConfigurationManager.get_defaults()},