#391: Verify if the configured files exist
This commit is contained in:
parent
ec430a5cba
commit
d51d3f61ac
@ -39,8 +39,11 @@ def on_internet_available(agent):
|
||||
if READY:
|
||||
if STATUS.newer_then_days(OPTIONS['interval']):
|
||||
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:
|
||||
display = agent.view()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user