def set_status(self, status): self.status = status if status == OpStatus.FINISHED: notifications.TransferCompleteNotification(self) self.emit_status_changed()
def set_status(self, status): self.status = status if status == OpStatus.FINISHED: notifications.TransferCompleteNotification(self, sender=False) elif status in (OpStatus.FAILED_UNRECOVERABLE, OpStatus.FAILED): notifications.TransferFailedNotification(self, sender=False) self.emit_status_changed()
def set_status(self, status): self.status = status if status == OpStatus.FINISHED: notifications.TransferCompleteNotification(self, sender=False) elif status in (OpStatus.FAILED_UNRECOVERABLE, OpStatus.FAILED): notifications.TransferFailedNotification(self, sender=False) # We only care if the other remote cancelled. If we did it, we don't need a notification. elif status == OpStatus.STOPPED_BY_SENDER: notifications.TransferStoppedNotification(self, sender=False) self.emit_status_changed()