* src/ManagedWindow.py: mask strange Windows logging error on close

svn: r7179
This commit is contained in:
Brian Matherly
2006-08-15 03:12:14 +00:00
parent f528f74a12
commit 1a02c853c0
2 changed files with 9 additions and 6 deletions

View File

@ -138,12 +138,12 @@ def setup_logging():
if type == KeyboardInterrupt:
# Ctrl-C is not a bug.
return
if type == IOError:
# strange Windows logging error on close
return
import traceback
try:
log.error("Unhandled exception\n" +
"".join(traceback.format_exception(type, value, tb)))
except IOError:
pass
log.error("Unhandled exception\n" +
"".join(traceback.format_exception(type, value, tb)))
sys.excepthook = exc_hook