diff options
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r-- | scripts/lib/devtool/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index e675133f63..31ecb65937 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py | |||
@@ -23,6 +23,7 @@ import sys | |||
23 | import subprocess | 23 | import subprocess |
24 | import logging | 24 | import logging |
25 | import re | 25 | import re |
26 | import codecs | ||
26 | 27 | ||
27 | logger = logging.getLogger('devtool') | 28 | logger = logging.getLogger('devtool') |
28 | 29 | ||
@@ -67,10 +68,10 @@ def exec_watch(cmd, **options): | |||
67 | cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **options | 68 | cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **options |
68 | ) | 69 | ) |
69 | 70 | ||
71 | reader = codecs.getreader('utf-8')(process.stdout) | ||
70 | buf = '' | 72 | buf = '' |
71 | while True: | 73 | while True: |
72 | out = process.stdout.read(1) | 74 | out = reader.read(1, 1) |
73 | out = out.decode('utf-8') | ||
74 | if out: | 75 | if out: |
75 | sys.stdout.write(out) | 76 | sys.stdout.write(out) |
76 | sys.stdout.flush() | 77 | sys.stdout.flush() |