Example #1
0
File: ops.py Project: sahwar/warp
    def set_status(self, status):
        self.status = status

        if status == OpStatus.FINISHED:
            notifications.TransferCompleteNotification(self)

        self.emit_status_changed()
Example #2
0
    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()
Example #3
0
    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()