From 9de53bf788e6f878396f6b796d39f21c058f3f16 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 25 Jul 2015 22:44:56 +0100 Subject: [PATCH] tools/pyboard.py: Fix parsing of returned error so last chr is not lost. --- tools/pyboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pyboard.py b/tools/pyboard.py index 162a15024c..fec30e1592 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -104,7 +104,7 @@ class Pyboard: data_err = self.read_until(1, b'\x04', timeout=timeout) if not data_err.endswith(b'\x04'): raise PyboardError('timeout waiting for second EOF reception') - data_err = data_err[:-2] + data_err = data_err[:-1] # return normal and error output return data, data_err