~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

  • Committer: Robert Collins
  • Date: 2007-04-30 03:48:51 UTC
  • mfrom: (2468 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2470.
  • Revision ID: robertc@robertcollins.net-20070430034851-aik2bzpubf44oyjc
Merge Johns fix for bug 110256.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
        if self.properties:
77
77
            for property in self.properties:
78
78
                key_end = property.find(': ')
79
 
                assert key_end is not None
80
 
                key = property[:key_end].encode('utf-8')
81
 
                value = property[key_end+2:].encode('utf-8')
 
79
                if key_end == -1:
 
80
                    assert property.endswith(':')
 
81
                    key = str(property[:-1])
 
82
                    value = ''
 
83
                else:
 
84
                    key = str(property[:key_end])
 
85
                    value = property[key_end+2:]
82
86
                rev.properties[key] = value
83
87
 
84
88
        return rev