From 31fcd491fd9fd99f81599558b5256cfaaa078da0 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 9 Jun 2021 14:46:56 -0400 Subject: serialhdl: Support prepending a warn_prefix to error and log messages Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'klippy/mcu.py') diff --git a/klippy/mcu.py b/klippy/mcu.py index 6fb66247..f03fd16d 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -415,7 +415,8 @@ class MCU: if self._name.startswith('mcu '): self._name = self._name[4:] # Serial port - self._serial = serialhdl.SerialReader(self._reactor) + wp = "mcu '%s': " % (self._name) + self._serial = serialhdl.SerialReader(self._reactor, warn_prefix=wp) self._baud = 0 self._canbus_iface = None canbus_uuid = config.get('canbus_uuid', None) -- cgit v1.2.3-70-g09d2