adding *better* filtering
This commit is contained in:
11
main.py
11
main.py
@@ -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"]:
|
arguments.dryrun = False
|
||||||
if parser["restic"]["dryrun"].lower() == "true" \
|
if "dryrun" in parser["restic"] and (parser["restic"]["dryrun"].lower() == "true" \
|
||||||
or (parser["restic"]["dryrun"].isdigit() and parser["restic"]["dryrun"] > 0):
|
or (parser["restic"]["dryrun"].isdigit() and parser["restic"]["dryrun"] > 0)):
|
||||||
arguments.dryrun = ()
|
arguments.dryrun = True
|
||||||
else:
|
|
||||||
arguments.dryrun = False
|
|
||||||
|
|
||||||
|
|
||||||
def restic_backup(dirpath: str, tagslist: list = None):
|
def restic_backup(dirpath: str, tagslist: list = None):
|
||||||
|
|||||||
Reference in New Issue
Block a user