#391: Verify if the configured files exist

This commit is contained in:
Alex Muthmann 2019-10-25 10:55:45 +02:00 committed by GitHub
parent ec430a5cba
commit d51d3f61ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,10 @@ def on_internet_available(agent):
if STATUS.newer_then_days(OPTIONS['interval']): if STATUS.newer_then_days(OPTIONS['interval']):
return return
files_to_backup = " ".join(OPTIONS['files']) # Only backup existing files to prevent errors
existing_files = list(filter(lambda f: os.path.exists(f), OPTIONS['files']))
files_to_backup = " ".join(existing_files)
try: try:
display = agent.view() display = agent.view()