diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-03-12 22:37:14 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-03-12 22:56:31 -0400 |
commit | 9bc4239e9c9375b60114c79b338cf895e410879b (patch) | |
tree | e2bb638a73de8cb041b262e4e52661035b8666ad /klippy/gcode.py | |
parent | 3a1cdc7d70e084592e9526239a6b40a1d17e32ae (diff) | |
download | kutter-9bc4239e9c9375b60114c79b338cf895e410879b.tar.gz kutter-9bc4239e9c9375b60114c79b338cf895e410879b.tar.xz kutter-9bc4239e9c9375b60114c79b338cf895e410879b.zip |
gcode: On a multi-line error message, report the first line twice
Report the first line of a multi-line error message twice - once as
part of the informational content, and once with the "!!" error
prefix.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/gcode.py')
-rw-r--r-- | klippy/gcode.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py index 82156d89..4c1e4c83 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -246,8 +246,8 @@ class GCodeParser: logging.warning(msg) lines = msg.strip().split('\n') if len(lines) > 1: - self.respond_info("\n".join(lines[:-1])) - self.respond('!! %s' % (lines[-1].strip(),)) + self.respond_info("\n".join(lines)) + self.respond('!! %s' % (lines[0].strip(),)) # Parameter parsing helpers class sentinel: pass def get_str(self, name, params, default=sentinel, parser=str): |