diff --git a/gui.py b/gui.py index 9c00891..32d535e 100644 --- a/gui.py +++ b/gui.py @@ -152,7 +152,7 @@ class Dashboard: try: msg = self.event_queue.get_nowait() self.window["-LOG-"].print(msg) - except: + except Exception: break # Update statistics diff --git a/setup_wizard.py b/setup_wizard.py index d823012..aae7c73 100644 --- a/setup_wizard.py +++ b/setup_wizard.py @@ -181,7 +181,7 @@ async def validate_perplexity_key(api_key, model="sonar-pro"): print_warning(f"400 Fehler: {error_msg}") print_info("Fahre trotzdem fort - bitte später manuell prüfen!") return (True, False, model) - except: + except Exception: print_warning(f"Unerwartete Antwort: {response.status_code}") print_info("Fahre trotzdem fort - bitte später manuell prüfen!") return (True, False, model) diff --git a/test_credentials.py b/test_credentials.py index 7f07820..b15fcad 100644 --- a/test_credentials.py +++ b/test_credentials.py @@ -210,7 +210,7 @@ async def test_perplexity_key(api_key, model="sonar-pro"): if "choices" in data and len(data["choices"]) > 0: content = data["choices"][0]["message"]["content"] print_info(f"Test response: '{content}'") - except: + except Exception: pass return True, test_model @@ -237,7 +237,7 @@ async def test_perplexity_key(api_key, model="sonar-pro"): continue else: print_info(f"Error details: {error_msg}") - except: + except Exception: print_warning(f"400 Bad Request (couldn't parse error)") # If this was the last model, fail @@ -254,7 +254,7 @@ async def test_perplexity_key(api_key, model="sonar-pro"): print_warning(f"Unexpected status code: {response.status_code}") try: print_info(f"Response: {response.text[:200]}") - except: + except Exception: pass # Try next model if available