~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Martin Pool
  • Date: 2007-09-26 02:30:45 UTC
  • mto: This revision was merged to the branch mainline in revision 2868.
  • Revision ID: mbp@sourcefrog.net-20070926023045-npkv70za15v30w1r
Review feedback on BzrError.message handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        try:
96
96
            fmt = self._get_format_string()
97
97
            if fmt:
98
 
                d = (self.__dict__)
 
98
                d = dict(self.__dict__)
99
99
                # special case: python2.5 puts the 'message' attribute in a
100
100
                # slot, so it isn't seen in __dict__
101
 
                d['message'] = getattr(self, 'message', 'dummy message')
 
101
                d['message'] = getattr(self, 'message', 'no message')
102
102
                s = fmt % d
103
103
                # __str__() should always return a 'str' object
104
104
                # never a 'unicode' object.