Check rsync return code
This commit is contained in:
parent
fa1d8f410e
commit
c6432c1350
@ -192,6 +192,9 @@ class Backup:
|
|||||||
p = Popen(rsync, stdout=PIPE, stderr=STDOUT, shell=True)
|
p = Popen(rsync, stdout=PIPE, stderr=STDOUT, shell=True)
|
||||||
output, _ = p.communicate()
|
output, _ = p.communicate()
|
||||||
|
|
||||||
|
if p.returncode != 0:
|
||||||
|
self._err_flag = True
|
||||||
|
|
||||||
output = output.decode("utf-8").split('\n')
|
output = output.decode("utf-8").split('\n')
|
||||||
|
|
||||||
logger.info(f'rsync: {output[-3]}')
|
logger.info(f'rsync: {output[-3]}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user