klippy: Replace deprecated logger.warn with logger.warning (#6385)

Replace deprecated logger.warn with logger.warning

logger.warn will be removed in Python 3.13

Signed-off-by: Thijs Triemstra <info@collab.nl>
This commit is contained in:
Thijs Triemstra 2023-11-17 04:06:13 +01:00 committed by GitHub
parent 3f8f30d612
commit 4688c21c54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 16 deletions

View file

@ -137,8 +137,8 @@ class SerialReader:
bustype='socketcan')
bus.send(set_id_msg)
except (can.CanError, os.error) as e:
logging.warn("%sUnable to open CAN port: %s",
self.warn_prefix, e)
logging.warning("%sUnable to open CAN port: %s",
self.warn_prefix, e)
self.reactor.pause(self.reactor.monotonic() + 5.)
continue
bus.close = bus.shutdown # XXX