* [gentoo-commits] portage r15236 - main/branches/2.1.7/pym/portage
@ 2010-01-29 18:45 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-01-29 18:45 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2010-01-29 18:45:41 +0000 (Fri, 29 Jan 2010)
New Revision: 15236
Modified:
main/branches/2.1.7/pym/portage/util.py
Log:
Handle AttributeError inside atomic_ofstream.__del__. Thanks to Cardoe for
reporting. (trunk r15168)
Modified: main/branches/2.1.7/pym/portage/util.py
===================================================================
--- main/branches/2.1.7/pym/portage/util.py 2010-01-29 18:45:33 UTC (rev 15235)
+++ main/branches/2.1.7/pym/portage/util.py 2010-01-29 18:45:41 UTC (rev 15236)
@@ -1009,9 +1009,13 @@
def __del__(self):
"""If the user does not explicitely call close(), it is
assumed that an error has occurred, so we abort()."""
- f = object.__getattribute__(self, '_file')
- if not f.closed:
- self.abort()
+ try:
+ f = object.__getattribute__(self, '_file')
+ except AttributeError:
+ pass
+ else:
+ if not f.closed:
+ self.abort()
# ensure destructor from the base class is called
base_destructor = getattr(ObjectProxy, '__del__', None)
if base_destructor is not None:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-29 18:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29 18:45 [gentoo-commits] portage r15236 - main/branches/2.1.7/pym/portage Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox