Rev 2856: Review feedback on BzrError.message handling in http://sourcefrog.net/bzr/exception-keyerrors
Martin Pool
mbp at sourcefrog.net
Wed Sep 26 03:30:46 BST 2007
At http://sourcefrog.net/bzr/exception-keyerrors
------------------------------------------------------------
revno: 2856
revision-id: mbp at sourcefrog.net-20070926023045-npkv70za15v30w1r
parent: mbp at sourcefrog.net-20070925062946-1tlmmt604lf9bllm
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: exception-keyerrors
timestamp: Wed 2007-09-26 12:30:45 +1000
message:
Review feedback on BzrError.message handling
modified:
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
=== modified file 'bzrlib/errors.py'
--- a/bzrlib/errors.py 2007-09-25 06:29:46 +0000
+++ b/bzrlib/errors.py 2007-09-26 02:30:45 +0000
@@ -95,10 +95,10 @@
try:
fmt = self._get_format_string()
if fmt:
- d = (self.__dict__)
+ d = dict(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')
+ d['message'] = getattr(self, 'message', 'no message')
s = fmt % d
# __str__() should always return a 'str' object
# never a 'unicode' object.
More information about the bazaar-commits
mailing list