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
@@ -497,7 +497,7 @@ class PasswordPlugin(PluginBase):
|
||||
f"Password '{name}' {action_word} successfully",
|
||||
]
|
||||
)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
print(f"Failed to add password '{name}'")
|
||||
@@ -524,7 +524,7 @@ class PasswordPlugin(PluginBase):
|
||||
f"Password '{name}' removed successfully",
|
||||
]
|
||||
)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
print(f"Failed to remove password '{name}'")
|
||||
@@ -564,7 +564,7 @@ class PasswordPlugin(PluginBase):
|
||||
f"Password for '{name}' copied to clipboard",
|
||||
]
|
||||
)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Clear cache to force refresh
|
||||
|
||||
Reference in new issue
Block a user