[MERGE] #144633 Fix "unprintable error" message for BzrCheckError and others
Martin Pool
mbp at sourcefrog.net
Wed Sep 26 03:30:42 BST 2007
On Tue, 2007-09-25 at 16:06 -0400, Alexander Belchenko wrote:
> Alexander Belchenko has voted tweak.
> Status is now: Conditionally approved
> Comment:
> === modified file 'bzrlib/errors.py'
> --- bzrlib/errors.py 2007-09-13 01:54:49 +0000
> +++ bzrlib/errors.py 2007-09-25 06:29:46 +0000
> @@ -95,7 +95,11 @@
> try:
> fmt = self._get_format_string()
> if fmt:
> - s = fmt % self.__dict__
> + d = (self.__dict__)
>
> ^-- Why for you put parentheses around self.__dict__?
I meant to do d = dict(self.__dict__), to make a copy of it; I've done
that now.
>
> + # special case: python2.5 puts the 'message' attribute
> in a
> + # slot, so it isn't seen in __dict__
> + d['message'] = getattr(self, 'message', 'dummy
> message')
> + s = fmt % d
>
> ^-- 'dummy message', heh? Is not 'no message' is technically better?
Yes, it's better :-) It was just to make test failures obvious.
Martin
More information about the bazaar
mailing list