From 2ae38a1955e0e2651e5da740a3a30d1e755e85f0 Mon Sep 17 00:00:00 2001 From: Eric Butler Date: Mon, 15 Jul 2013 11:27:20 -0700 Subject: [PATCH] Ignore bad utf8 data. Fixes #22. --- pidcat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pidcat.py b/pidcat.py index 360622e..ee060ff 100755 --- a/pidcat.py +++ b/pidcat.py @@ -175,7 +175,7 @@ def parse_death(tag, message): while adb.poll() is None: try: - line = adb.stdout.readline().decode('utf-8').strip() + line = adb.stdout.readline().decode('utf-8', 'replace').strip() except KeyboardInterrupt: break if len(line) == 0: