# HG changeset patch # User Tuomo Valkonen # Date 1517855556 0 # Node ID 6409aa77ddd5ac7a555e4760898bddb5d4320af4 # Parent f63835e9f29e79a3b233d17ad72e12f0424be33b Error status wasn't correctly transmitted to UI after recent changes. diff -r f63835e9f29e -r 6409aa77ddd5 borgend/backup.py --- 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