[MERGE] fixes for selftest on win32 (part 2)

Wouter van Heyst larstiq at larstiq.dyndns.org
Tue Mar 13 11:27:30 GMT 2007


On Tue, Mar 13, 2007 at 01:15:35AM +0200, Alexander Belchenko wrote:
> John Arbash Meinel пишет:
> > Alexander Belchenko wrote:
> >> Next portion of fixes for selftest on win32:
> > 
> >>  2332 Alexander Belchenko       2007-03-11
> >>       test_sftp_transport: fix 1 test, skip 1 test; now all tests pass on win32
> 
> I apologize for this comment. 'all tests pass' related to test_sftp_transport.py
> 
> > === modified file bzrlib/errors.py
> > --- bzrlib/errors.py
> > +++ bzrlib/errors.py
> > @@ -647,7 +647,7 @@
> > 
> >  class LockError(BzrError):
> > 
> > -    _fmt = "Lock error: %(message)s"
> > +    _fmt = "Lock error: %(msg)s"
> > 
> >      internal_error = True
> > 
> > @@ -657,7 +657,7 @@
> >      #
> >      # New code should prefer to raise specific subclasses
> >      def __init__(self, message):
> > -        self.message = message
> > +        self.msg = message
> > 
> > 
> > ^- Was this specifically needed? You seem to just be changing the
> > variable, without actually changing the effect. But then again, children
> > might be doing something different.
> 
> Yes, this needed for Python 2.5.
> It works OK on Python 2.4, but not on Python 2.5.
> In Python 2.5 basic class of all our errors (StandardError)
> has attribute .message, that don't reflected in __dict__.
> I'm not sure why, but you can test it with simple code:

How did you figure this out? It had me quite stumped when I looked at it
yesterday. (So much for not reading mail first)

Wouter van Heyst



More information about the bazaar mailing list