changeset: 74538:73dad4940b88 branch: 3.1 parent: 74253:fb5707168351 user: Vinay Sajip date: Fri Jan 20 11:23:02 2012 +0000 files: Lib/logging/__init__.py description: Closes #13807: Now checks for sys.stderr being there before writing to it. diff -r fb5707168351 -r 73dad4940b88 Lib/logging/__init__.py --- a/Lib/logging/__init__.py Tue Jan 03 16:23:11 2012 -0600 +++ b/Lib/logging/__init__.py Fri Jan 20 11:23:02 2012 +0000 @@ -721,7 +721,7 @@ You could, however, replace this with a custom handler if you wish. The record which was being processed is passed in to this method. """ - if raiseExceptions: + if raiseExceptions and sys.stderr: # see issue 13807 ei = sys.exc_info() try: traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)

AltStyle によって変換されたページ (->オリジナル) /