From f2990ff23ba5d5e13a116f04b36f0de2981a0a3b Mon Sep 17 00:00:00 2001 From: Vincent Bidolet Date: Mon, 13 Nov 2023 18:50:09 +0100 Subject: [PATCH] adding *better* filtering --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 792ee72..2af71d5 100644 --- a/main.py +++ b/main.py @@ -61,7 +61,9 @@ def read_config_file(filepath: str = "configuration.ini"): arguments.repository = parser["restic"]["repository"] arguments.passwordfile = parser["restic"]["passwordfile"] if "dryrun" in parser["restic"]: - arguments.dryrun = (parser["restic"]["dryrun"].lower() == "true" or parser["restic"]["dryrun"] > 0) + if parser["restic"]["dryrun"].lower() == "true" \ + or (parser["restic"]["dryrun"].isdigit() and parser["restic"]["dryrun"] > 0): + arguments.dryrun = () else: arguments.dryrun = False