From: Mikael Frykholm Date: Fri, 29 May 2015 06:54:20 +0000 (+0200) Subject: Sane rsync returncodes X-Git-Url: https://git.frykholm.com/butterbackup.git/commitdiff_plain/41690a07f95e91c0c629013e2fb179a7e9e755bc Sane rsync returncodes --- 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)):