[Zope3-checkins] SVN: Zope3/branches/3.3/zopeskel/bin/test.in Added code to work around logging bugs.

Jim Fulton jim at zope.com
Fri Aug 18 11:17:01 EDT 2006


Log message for revision 69651:
  Added code to work around logging bugs.
  

Changed:
  U   Zope3/branches/3.3/zopeskel/bin/test.in

-=-
Modified: Zope3/branches/3.3/zopeskel/bin/test.in
===================================================================
--- Zope3/branches/3.3/zopeskel/bin/test.in	2006-08-18 13:00:09 UTC (rev 69650)
+++ Zope3/branches/3.3/zopeskel/bin/test.in	2006-08-18 15:17:00 UTC (rev 69651)
@@ -41,4 +41,18 @@
 warnings.filterwarnings(
     'ignore', 'PyCrypto', RuntimeWarning, 'twisted[.]conch[.]ssh')
 
-sys.exit(testrunner.run(defaults))
+result = testrunner.run(defaults)
+
+# Note, the logging system has bugs, fixed in Python 2.5 that cause spurious
+# errors on exit.  We'll execute a fairly voilent suicide to try to avoid
+# these.  Given that this is just a test runner, this should be OK.
+
+# Avoid spurious error during exit. Some thing is trying to log
+# something after the files used by the logger have been closed.
+logging.disable(999999999)
+
+# Because we're about to use os._exit, we flush output so we don't miss any.
+sys.stdout.flush()
+sys.stderr.flush()
+
+os._exit(result)



More information about the Zope3-Checkins mailing list