diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 58afcd29c90..b4659af7cc9 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1091,8 +1091,8 @@ class StreamHandler(Handler): try: msg = self.format(record) stream = self.stream - stream.write(msg) - stream.write(self.terminator) + # issue 35046: merged two stream.writes into one. + stream.write(msg + self.terminator) self.flush() except Exception: self.handleError(record)