From 95201882e62ae48c4d0c9cd260556ab6ad44ba0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 26 Feb 2021 13:34:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20logger.warn=20=3D>=20logger.warn?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/octoprint/comm/protocol/reprap/__init__.py | 4 ++-- src/octoprint/comm/transport/serialtransport.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/octoprint/comm/protocol/reprap/__init__.py b/src/octoprint/comm/protocol/reprap/__init__.py index 601212562..344a5804b 100644 --- a/src/octoprint/comm/protocol/reprap/__init__.py +++ b/src/octoprint/comm/protocol/reprap/__init__.py @@ -1217,7 +1217,7 @@ class ReprapGcodeProtocol( elif heater == "chamber": command = self.flavor.command_set_chamber_temp(temperature, wait=wait) else: - self._logger.warn( + self._logger.warning( "Got unknown heater identifier to set temperature on: {}".format(heater) ) return @@ -2156,7 +2156,7 @@ class ReprapGcodeProtocol( "Resetting state to be on the safe side." ) self.process_protocol_log(message) - self._logger.warn(message) + self._logger.warning(message) self._on_external_reset() diff --git a/src/octoprint/comm/transport/serialtransport.py b/src/octoprint/comm/transport/serialtransport.py index b9c16f4d5..8b5b57413 100644 --- a/src/octoprint/comm/transport/serialtransport.py +++ b/src/octoprint/comm/transport/serialtransport.py @@ -233,7 +233,7 @@ class SerialTransport(Transport): try: written += try_to_write(to_send) except serial.SerialTimeoutException: - self._logger.warn( + self._logger.warning( "Serial timeout while writing to serial port, trying again." ) try: @@ -256,8 +256,8 @@ class SerialTransport(Transport): passes += 1 if passes > self.max_write_passes: message = ( - "Could not write anything to the serial port in {} tries, something appears to be " - "wrong with the printer communication".format( + "Could not write anything to the serial port in {} tries, " + "something appears to be wrong with the communication".format( self.max_write_passes ) )