[MERGE] #144633 Fix "unprintable error" message for BzrCheckError and others
Alexander Belchenko
bialix at ukr.net
Tue Sep 25 21:06:04 BST 2007
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__?
+ # 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?
For details, see:
http://bundlebuggy.aaronbentley.com/request/%3C20070925063115.GA1300%40sourcefrog.net%3E
More information about the bazaar
mailing list