reboot-ping-pong: Cope with un-encodable output sequences
By dropping them on the floor.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I3af6820dd00c7c81b2a3f91853f8f22d55d520ca
diff --git a/amboar/obmc-scripts/reboot-ping-pong/rpp b/amboar/obmc-scripts/reboot-ping-pong/rpp
index 99eae0a..c4940a9 100755
--- a/amboar/obmc-scripts/reboot-ping-pong/rpp
+++ b/amboar/obmc-scripts/reboot-ping-pong/rpp
@@ -52,7 +52,10 @@
class PexpectLogger(object):
def write(self, bstring):
- sys.stdout.write(bstring.decode())
+ try:
+ sys.stdout.write(bstring.decode())
+ except UnicodeDecodeError:
+ print("Dropping broken unicode line")
def flush(self):
sys.stdout.flush()