[MERGE] #144633 Fix "unprintable error" message for BzrCheckError and others

Alexander Belchenko bialix at ukr.net
Wed Sep 26 06:55:34 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool пишет:
> 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.

May be using self.__dict__.copy()? copy() method create shallow copy,
but IMO it's sufficient in this particular case.

- --
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG+fRWzYr338mxwCURAukEAJ9vtFGN/bWeF9THmrEuUPUhKJewFACfekmE
wjorH4H/bUa1+px1Gy0OF8c=
=0BdR
-----END PGP SIGNATURE-----



More information about the bazaar mailing list