From df4ce320651e4a3e36cf2cc6c8cbd22ca49ba5b2 Mon Sep 17 00:00:00 2001 From: deajan Date: Fri, 24 Jan 2025 14:41:21 +0100 Subject: [PATCH] CLI: task_type might be undefined --- npbackup/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/npbackup/__main__.py b/npbackup/__main__.py index 5ae1520..4bd1e2b 100644 --- a/npbackup/__main__.py +++ b/npbackup/__main__.py @@ -503,8 +503,10 @@ This is free software, and you are welcome to redistribute it under certain cond ): if args.create_backup_scheduled_task: task_type = "backup" - if args.create_housekeeping_scheduled_task: + elif args.create_housekeeping_scheduled_task: task_type = "housekeeping" + else: + task_type = None hours, minutes = args.create_scheduled_task.split(",") hour = hours.split("=")[1].strip() minute = minutes.split("=")[1].strip()