adding *better* filtering

This commit is contained in:
Vincent Bidolet
2023-11-13 18:52:02 +01:00
parent f2990ff23b
commit 01bcf68d13

View File

@@ -60,12 +60,11 @@ def read_config_file(filepath: str = "configuration.ini"):
arguments.remotehost = parser["restic"]["remotehost"] arguments.remotehost = parser["restic"]["remotehost"]
arguments.repository = parser["restic"]["repository"] arguments.repository = parser["restic"]["repository"]
arguments.passwordfile = parser["restic"]["passwordfile"] arguments.passwordfile = parser["restic"]["passwordfile"]
if "dryrun" in parser["restic"]:
if parser["restic"]["dryrun"].lower() == "true" \
or (parser["restic"]["dryrun"].isdigit() and parser["restic"]["dryrun"] > 0):
arguments.dryrun = ()
else:
arguments.dryrun = False arguments.dryrun = False
if "dryrun" in parser["restic"] and (parser["restic"]["dryrun"].lower() == "true" \
or (parser["restic"]["dryrun"].isdigit() and parser["restic"]["dryrun"] > 0)):
arguments.dryrun = True
def restic_backup(dirpath: str, tagslist: list = None): def restic_backup(dirpath: str, tagslist: list = None):