From 46113be10fbc30189ecb16036206841e3e53e267 Mon Sep 17 00:00:00 2001 From: brent s Date: Wed, 5 Jun 2019 23:18:17 -0400 Subject: [PATCH] same thing for excludes --- backup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backup.py b/backup.py index a84d07f..4c261ed 100755 --- a/backup.py +++ b/backup.py @@ -297,7 +297,8 @@ class Backup(object): _cmd.extend(['--compression', repo['compression']]) if 'exclude' in repo: for e in repo['exclude']: - _cmd.extend(['--exclude', e]) + if os.path.exists(e): + _cmd.extend(['--exclude', e]) if self.repos[server]['remote'].lower()[0] in ('1', 't'): repo_tgt = '{0}@{1}'.format(_user, server) else: