# HG changeset patch # User Tuomo Valkonen # Date 1517855648 0 # Node ID 246190bfd50195464b8e2b76d7e8c6d230b12858 # Parent 6409aa77ddd5ac7a555e4760898bddb5d4320af4 Better error reporting logic. diff -r 6409aa77ddd5 -r 246190bfd501 borgend/backup.py --- a/borgend/backup.py Mon Feb 05 18:32:36 2018 +0000 +++ b/borgend/backup.py Mon Feb 05 18:34:08 2018 +0000 @@ -100,19 +100,19 @@ class Status(Operation): def __init__(self, backup, op=None): op=backup.current_operation - errorsop=backup.previous_operation + errorsop=backup.current_operation if not op: op=backup.scheduled_operation + if not errorsop: + errorsop=backup.previous_operation + if op: super().__init__(op.type, op.start_time, **op.detail) else: super().__init__(None, None) - if not errorsop: - errorsop=op - if errorsop: self.errors=errorsop.errors