adding *better* filtering

This commit is contained in:
Vincent Bidolet
2023-11-13 18:50:09 +01:00
parent 116af4c0ea
commit f2990ff23b

View File

@@ -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