Mon, 05 Feb 2018 18:32:36 +0000
Error status wasn't correctly transmitted to UI after recent changes.
borgend/backup.py | file | annotate | diff | comparison | revisions |
--- a/borgend/backup.py Mon Feb 05 18:24:30 2018 +0000 +++ b/borgend/backup.py Mon Feb 05 18:32:36 2018 +0000 @@ -99,24 +99,23 @@ class Status(Operation): def __init__(self, backup, op=None): - op=None - errorsop=None + op=backup.current_operation + errorsop=backup.previous_operation - if backup.current_operation: - op=backup.current_operation - elif backup.scheduled_operation: + if not op: op=backup.scheduled_operation - if backup.previous_operation: - errorsop=backup.previous_operation if op: super().__init__(op.type, op.start_time, **op.detail) - if not errorsop: - errorsop=op - self.errors=errorsop.errors else: super().__init__(None, None) + if not errorsop: + errorsop=op + + if errorsop: + self.errors=errorsop.errors + self.name=backup.name self.state=backup.state