Skip to content

Commit ab3b644

Browse files
WIPpython3
1 parent d8e0e7f commit ab3b644

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

devlib/utils/misc.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,10 @@ def check_output(command, timeout=None, ignore=None, inputtext=None,
186186
else:
187187
timeout_expired = None
188188

189-
if sys.version_info[0] == 3:
190-
# Currently errors=replace is needed as 0x8c throws an error
191-
output = output.decode(sys.stdout.encoding or 'utf-8', "replace")
192-
if error:
193-
error = error.decode(sys.stderr.encoding or 'utf-8', "replace")
189+
# Currently errors=replace is needed as 0x8c throws an error
190+
output = output.decode(sys.stdout.encoding or 'utf-8', "replace")
191+
if error:
192+
error = error.decode(sys.stderr.encoding or 'utf-8', "replace")
194193

195194
if timeout_expired:
196195
raise TimeoutError(command, output='\n'.join([output or '', error or '']))

0 commit comments

Comments
 (0)