diff --git a/test/monkeyfarmer.py b/test/monkeyfarmer.py index cbdda0c07..4dfc41a30 100644 --- a/test/monkeyfarmer.py +++ b/test/monkeyfarmer.py @@ -115,7 +115,11 @@ class MonkeyFarmer(asyncore.dispatcher): self.buffer += cmd.encode('utf-8') def monkey_says(self, line): - line = line.decode('utf-8') + try: + line = line.decode('utf-8') + except UnicodeDecodeError: + print("WARNING: Unicode decode error") + line = line.decode('utf-8', 'replace') if not self.quiet: print("<<< {}".format(line)) self.discussion.append(("<", line))