~ubuntuone-control-tower/ubuntuone-storage-protocol/stable-1-6

« back to all changes in this revision

Viewing changes to ubuntuone/storageprotocol/delta.py

  • Committer: Tarmac
  • Author(s): Rodney Dawes
  • Date: 2010-11-16 15:10:48 UTC
  • mfrom: (121.1.4 use-packages)
  • Revision ID: tarmac-20101116151048-b0e20j7lorb4yhe1
Switch to using packaged mocker and ubuntuone-dev-tools
Use pyflakes with u1lint and also run pep8
Fix a lot of pylint/pyflakes/pep8 errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
            content_hash=info.content_hash,
69
69
            crc32=info.crc32,
70
70
            size=info.size,
71
 
            last_modified=info.last_modified
72
 
        )
 
71
            last_modified=info.last_modified)
73
72
        return result
74
73
 
75
74
    def __eq__(self, other):
82
81
message_type_registry = {
83
82
    protocol_pb2.DeltaInfo.FILE_INFO: FileInfoDelta.from_message}
84
83
 
 
84
 
85
85
def from_message(message):
86
86
    """Generates Info objects from DELTA_INFO messages."""
87
87
    return message_type_registry[message.delta_info.type](message.delta_info)