On 12.06.2009 15:57, Adrian Buehlmann wrote: > On 12.06.2009 11:46, Adrian Buehlmann wrote: > (2) > There is a second exception (AttributeError) that was triggered when > mercurial.util.atomictempfile tried to clean up after the first > exception. This second exception was ignored. > > The second exception reveals a bug in mercurial.util.atomictempfile > as there is no 'closed' attribute if mktempcopy fails in > atomictempfile.__init__. > So if I just apply change (1) I still have > > Exception exceptions.AttributeError: "'NoneType' object has no attribute > 'closed'" in > <bound method atomictempfile.__del__ of <mercurial.util.atomictempfile object > at > 0x00CCF370>> ignored > > left in error output, but at least thgtaskbar.exe does not crash any more in > this > case. > > Fixing (2) probably needs something like: > > > diff --git a/mercurial/util.py b/mercurial/util.py > --- a/mercurial/util.py > +++ b/mercurial/util.py > @@ -772,12 +772,11 @@ class atomictempfile(object): > rename(self.temp, localpath(self.__name)) > > def __del__(self): > - if not self.closed: > + if self._fp and not self.closed: > try: > os.unlink(self.temp) > except: pass > - if self._fp: > - self._fp.close() > + self._fp.close() > > def makedirs(name, mode=None): > """recursive directory creation with parent mode inheritance"""
Filed as http://www.selenic.com/mercurial/bts/issue1695 ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Tortoisehg-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop
