File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 19
19
from copy import deepcopy
20
20
import datetime
21
21
import errno
22
+ import locale
22
23
import os
23
24
import re
24
25
import platform
@@ -1258,17 +1259,17 @@ def _process(drain=0):
1258
1259
stdout , stderr = proc .communicate ()
1259
1260
if stdout and isinstance (stdout , bytes ):
1260
1261
try :
1261
- stdout = stdout .decode ()
1262
+ stdout = stdout .decode (locale . getdefaultlocale ()[ 1 ] )
1262
1263
except UnicodeDecodeError :
1263
1264
stdout = stdout .decode ("ISO-8859-1" )
1264
1265
if stderr and isinstance (stderr , bytes ):
1265
1266
try :
1266
- stderr = stderr .decode ()
1267
+ stderr = stderr .decode (locale . getdefaultlocale ()[ 1 ] )
1267
1268
except UnicodeDecodeError :
1268
1269
stderr = stderr .decode ("ISO-8859-1" )
1269
1270
1270
- result ['stdout' ] = str ( stdout ) .split ('\n ' )
1271
- result ['stderr' ] = str ( stderr ) .split ('\n ' )
1271
+ result ['stdout' ] = stdout .split ('\n ' )
1272
+ result ['stderr' ] = stderr .split ('\n ' )
1272
1273
result ['merged' ] = ''
1273
1274
if output == 'file' :
1274
1275
ret_code = proc .wait ()
You can’t perform that action at this time.
0 commit comments