diff options
author | Johannes Demel <johannes@demels.de> | 2018-10-12 00:23:24 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-11-12 14:11:05 -0800 |
commit | 73cae35cfc63cc23474ce8d6196e868f21b6d3d4 (patch) | |
tree | 695189f97c1e35e884bf2f7dce6f16122a11ab22 | |
parent | 2835b7b8c51f455953712ffcce9fafd62399d6c9 (diff) |
GRC: fix failing thread run
In Py3k a string decode might trigger an error because it is already a unicode string. This is not the case in Py2k land. Thus, add a check.
-rw-r--r-- | grc/gui/Executor.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/grc/gui/Executor.py b/grc/gui/Executor.py index 480917f3f1..d0137f96d8 100644 --- a/grc/gui/Executor.py +++ b/grc/gui/Executor.py @@ -83,7 +83,10 @@ class ExecFlowGraphThread(threading.Thread): r = "\n" while r: GLib.idle_add(Messages.send_verbose_exec, r) - r = self.process.stdout.read(1024).decode('utf-8','ignore') + r = self.process.stdout.read(1024) + if not isinstance(r, str): + r = r.decode('utf-8','ignore') + self.process.poll() GLib.idle_add(self.done) |