Fix bare except clauses for better error handling
Replace 5 bare except clauses with 'except Exception:' to improve error handling and prevent catching system exits and keyboard interrupts: - gui.py:155 - Queue event processing - setup_wizard.py:184 - API response parsing - test_credentials.py:213 - Response JSON parsing - test_credentials.py:240 - Error response parsing - test_credentials.py:257 - Response text formatting This change improves code quality and follows Python best practices for exception handling.
This commit is contained in:
parent
2795178a75
commit
d3f2fa43c3
3 changed files with 5 additions and 5 deletions
2
gui.py
2
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue