diff options
author | RĂ©mi Lapeyre <remi.lapeyre@henki.fr> | 2019-03-15 06:53:34 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2019-03-15 06:53:34 (GMT) |
commit | 65f64b1903ae85b97a30f514bbc1b7ce940c3af2 (patch) | |
tree | e5c7726b578c7a37492366807927f3682df87681 /Lib/logging/__init__.py | |
parent | 1c668d16574d47cffd469e00930f39afac927288 (diff) | |
download | cpython-65f64b1903ae85b97a30f514bbc1b7ce940c3af2.zip cpython-65f64b1903ae85b97a30f514bbc1b7ce940c3af2.tar.gz cpython-65f64b1903ae85b97a30f514bbc1b7ce940c3af2.tar.bz2 |
bpo-36272: Logging now propagates RecursionError (GH-12312)
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r-- | Lib/logging/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index b4659af..7355396 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1032,6 +1032,8 @@ class Handler(Filterer): sys.stderr.write('Message: %r\n' 'Arguments: %s\n' % (record.msg, record.args)) + except RecursionError: # See issue 36272 + raise except Exception: sys.stderr.write('Unable to print the message and arguments' ' - possible formatting error.\nUse the' @@ -1094,6 +1096,8 @@ class StreamHandler(Handler): # issue 35046: merged two stream.writes into one. stream.write(msg + self.terminator) self.flush() + except RecursionError: # See issue 36272 + raise except Exception: self.handleError(record) |