Merge pull request #393 from deveth0/391_verify_backupfiles
#391: Verify if the configured files exist
This commit is contained in:
commit
3604f483aa
@ -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()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user