diff --git a/main.py b/main.py index 2af71d5..b43cfd7 100644 --- a/main.py +++ b/main.py @@ -60,12 +60,11 @@ def read_config_file(filepath: str = "configuration.ini"): arguments.remotehost = parser["restic"]["remotehost"] arguments.repository = parser["restic"]["repository"] 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):