~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-07-31 16:29:15 UTC
  • mfrom: (1886.1.5 read_empty_property-47782)
  • Revision ID: pqm@pqm.ubuntu.com-20060731162915-b2972d4eb057407a
(jam) fix bug #47782, rev props serialization should handle empty and unicode entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
204
204
                "bad tag under properties list: %r" % prop_elt.tag
205
205
            name = prop_elt.get('name')
206
206
            value = prop_elt.text
 
207
            # If a property had an empty value ('') cElementTree reads
 
208
            # that back as None, convert it back to '', so that all
 
209
            # properties have string values
 
210
            if value is None:
 
211
                value = ''
207
212
            assert name not in rev.properties, \
208
213
                "repeated property %r" % name
209
214
            rev.properties[name] = value