98 |
98 |
99 |
99 |
100 class Status(Operation): |
100 class Status(Operation): |
101 def __init__(self, backup, op=None): |
101 def __init__(self, backup, op=None): |
102 op=backup.current_operation |
102 op=backup.current_operation |
103 errorsop=backup.previous_operation |
103 errorsop=backup.current_operation |
104 |
104 |
105 if not op: |
105 if not op: |
106 op=backup.scheduled_operation |
106 op=backup.scheduled_operation |
107 |
107 |
|
108 if not errorsop: |
|
109 errorsop=backup.previous_operation |
|
110 |
108 if op: |
111 if op: |
109 super().__init__(op.type, op.start_time, **op.detail) |
112 super().__init__(op.type, op.start_time, **op.detail) |
110 else: |
113 else: |
111 super().__init__(None, None) |
114 super().__init__(None, None) |
112 |
|
113 if not errorsop: |
|
114 errorsop=op |
|
115 |
115 |
116 if errorsop: |
116 if errorsop: |
117 self.errors=errorsop.errors |
117 self.errors=errorsop.errors |
118 |
118 |
119 self.name=backup.name |
119 self.name=backup.name |