~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/rio.py

  • Committer: Martin Pool
  • Date: 2006-02-17 20:44:17 UTC
  • mto: This revision was merged to the branch mainline in revision 1569.
  • Revision ID: mbp@sourcefrog.net-20060217204417-fb97e1eb0e03ee38
rio.Stanza.add should raise TypeError on invalid types.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
        ## elif isinstance(value, (int, long)):
94
94
        ##    value = str(value)           # XXX: python2.4 without L-suffix
95
95
        else:
96
 
            raise ValueError("invalid value %r" % value)
 
96
            raise TypeError("invalid type for rio value: %r of type %s"
 
97
                            % (value, type(value)))
97
98
        self.items.append((tag, value))
98
99
        
99
100
    def __contains__(self, find_tag):