~ubuntuone-control-tower/ubuntuone-client/stable-4-2

« back to all changes in this revision

Viewing changes to ubuntuone/status/aggregator.py

- Avoid adding the same file to the recent transfers list twice, just reorder it. (LP: #1069953)

Show diffs side-by-side

added added

removed removed

Lines of Context:
754
754
        if command.deflated_size is not None:
755
755
            self.progress[
756
756
                (command.share_id, command.node_id)] = command.deflated_size
 
757
        if command.path in self.recent_transfers:
 
758
            self.recent_transfers.remove(command.path)
757
759
        self.recent_transfers.append(command.path)
758
760
        logger.debug("unqueueing command: %s", command.__class__.__name__)
759
761
        self.update_progressbar()
786
788
        if command.deflated_size is not None:
787
789
            self.progress[
788
790
                (command.share_id, command.node_id)] = command.deflated_size
 
791
        if command.path in self.recent_transfers:
 
792
            self.recent_transfers.remove(command.path)
789
793
        self.recent_transfers.append(command.path)
790
794
        logger.debug("unqueueing command: %s", command.__class__.__name__)
791
795
        self.update_progressbar()