~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml5.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-27 21:37:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1900.
  • Revision ID: john@arbash-meinel.com-20060727213707-92579eb90ffb3242
Fix bug #47782,
when reading a revision property with no value, 
it should use an empty string, not None

Show diffs side-by-side

added added

removed removed

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