From 41690a07f95e91c0c629013e2fb179a7e9e755bc Mon Sep 17 00:00:00 2001 From: Mikael Frykholm Date: Fri, 29 May 2015 08:54:20 +0200 Subject: [PATCH] Sane rsync returncodes --- butterbackup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/butterbackup.py b/butterbackup.py index 210f849..a1086b9 100755 --- a/butterbackup.py +++ b/butterbackup.py @@ -34,8 +34,10 @@ class Host(): print(command + excludes + " root@%s:/ "%(self.name) + self.subvol_dir) check_call(shlex.split(command + excludes + " root@%s:/ "%(self.name) + self.subvol_dir)) except CalledProcessError as ex: - if ex.returncode not in (12, 30): - print("Rsync did not transfer anything from %s, skipping snapshot."%self.name) + if ex.returncode in (24,): + pass + else: + print("Rsync error from %s, skipping snapshot. Rsync exit value=%s"%(self.name, ex.returncode)) return() todays_date = datetime.datetime.now().date().strftime("%F") if os.path.exists(os.path.join(self.host_dir, todays_date)): -- 2.39.2