From 14467ab346cb6b569ec5c78a7f5a72655259e49d Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 21 Mar 2016 22:58:22 -0700 Subject: [PATCH] Ignore certain rsync return codes --- datadb/__init__.py | 2 +- datadb/datadb.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/datadb/__init__.py b/datadb/__init__.py index f102a9c..3b93d0b 100755 --- a/datadb/__init__.py +++ b/datadb/__init__.py @@ -1 +1 @@ -__version__ = "0.0.1" +__version__ = "0.0.2" diff --git a/datadb/datadb.py b/datadb/datadb.py index 45214af..e79662e 100755 --- a/datadb/datadb.py +++ b/datadb/datadb.py @@ -104,7 +104,11 @@ def backup(profile, conf, force=False): #print("Rsync backup call: {}".format(' '.join(args))) - subprocess.check_call(args) + try: + subprocess.check_call(args) + except subprocess.CalledProcessError as cpe: + if cpe.returncode not in [0,24]: # ignore partial transfer due to vanishing files on our end + raise elif dest.scheme == 'archive': # CD to local source dir