From cecbefc71eacf8ae61a36bbb7fe06eb8c1fa03c6 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Sun, 19 Oct 2025 11:55:54 -0400 Subject: chore: clean up imports, rm dupe inits, bump ver --- py_modules/lsfg_vk/config_schema.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'py_modules/lsfg_vk/config_schema.py') 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()}, -- cgit v1.2.3