[Python-checkins] cpython (2.7): Ignore exceptions on test handler closing.

vinay.sajip python-checkins at python.org
Sat May 19 17:53:07 CEST 2012


http://hg.python.org/cpython/rev/9ab9bf20a4ea
changeset:   77057:9ab9bf20a4ea
branch:      2.7
parent:      77051:ff0fd7b26219
user:        Vinay Sajip <vinay_sajip at yahoo.co.uk>
date:        Sat May 19 16:50:07 2012 +0100
summary:
  Ignore exceptions on test handler closing.

files:
  Lib/test/test_logging.py |  5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -1907,7 +1907,10 @@
                     h.handle(r)
             finally:
                 remover.join()
-                h.close()
+                try:
+                    h.close()
+                except ValueError:
+                    pass
                 if os.path.exists(fn):
                     os.unlink(fn)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list