fix crash on remind run

This commit is contained in:
Alex Tau 2025-06-07 00:38:31 +03:00
parent 6cc3966221
commit 8af7b683b6
3 changed files with 7 additions and 7 deletions

8
flake.lock generated
View file

@ -2,16 +2,16 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1745487689, "lastModified": 1749086602,
"narHash": "sha256-FQoi3R0NjQeBAsEOo49b5tbDPcJSMWc3QhhaIi9eddw=", "narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5630cf13cceac06cefe9fc607e8dfa8fb342dde3", "rev": "4792576cb003c994bd7cc1edada3129def20b27d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.11", "ref": "nixos-25.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -89,7 +89,7 @@ async def async_main():
for checker in checker_sets[enabled_set]: for checker in checker_sets[enabled_set]:
checkers.append(checker) checkers.append(checker)
checker_sets[check_sets.REMIND][0].check_args = checkers checker_sets[check_sets.REMIND][0].check_args = [checkers]
command_manager = CommandHandlerManager(checkers) command_manager = CommandHandlerManager(checkers)
await command_manager.attach_handlers(tg_client) await command_manager.attach_handlers(tg_client)

View file

@ -7,12 +7,12 @@ from .vulnix import get_vulnix_output
IS_TESTING = False IS_TESTING = False
def vulnix_check() -> list[Alert]: async def vulnix_check() -> list[Alert]:
alert_list = [] alert_list = []
try: try:
vulnix_output = get_vulnix_output(IS_TESTING) vulnix_output = get_vulnix_output(IS_TESTING)
except Exception as e: except Exception as e:
send_alert( await send_alert(
Alert( Alert(
alert_type=AlertType.ERROR, alert_type=AlertType.ERROR,
message=f"Exception {type(e).__name__} while calling vulnix: {e}", message=f"Exception {type(e).__name__} while calling vulnix: {e}",