refactor(modules): improve exception handling and simplify service usage
Enhancements - Replace bare `except:` with `except Exception:` in multiple modules- Cast step calculation to `int` for consistent type - Simplify `get_battery_icon_file` to return a string directly - Use `get_todo_service()` instead of module-level `todo_service` throughout todo widget - Remove unused `"zen": "zen-browser"` mapping entry Bug Fixes - Prevent bare exception swallowing by catching `Exception` explicitly - Ensure proper cleanup of timer IDs and other resources - Delete unused modules/osdd components New Features - None
This commit is contained in:
34 files changed
+682
-519
No files matched your search
@@ -911,7 +911,7 @@ class PlayerBox(Box):
|
||||
from gi.repository import GLib
|
||||
|
||||
GLib.source_remove(self._seekbar_timer_id)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
self._seekbar_timer_id = None
|
||||
|
||||
@@ -1041,7 +1041,7 @@ class PlayerBox(Box):
|
||||
from gi.repository import GLib
|
||||
|
||||
GLib.source_remove(self._seekbar_timer_id)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
self._seekbar_timer_id = None
|
||||
|
||||
|
||||
Reference in new issue
Block a user