Grub4K commented on code in PR #37347:
URL: https://github.com/apache/airflow/pull/37347#discussion_r1585337313


##########
airflow/utils/log/logging_mixin.py:
##########
@@ -193,12 +202,15 @@ def write(self, message):
 
         :param message: message to log
         """
-        if not message.endswith("\n"):
-            self._buffer += message
-        else:
-            self._buffer += message.rstrip()
+        newline = message.endswith("\n")
+        result = message.rstrip() if newline else message
+
+        self._buffer += result
+        if newline:

Review Comment:
   Changed it to use an if statement



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to