Skip to content

Commit d160383

Browse files
committed
added UnicodeDecodeError to exception catch
1 parent 857384d commit d160383

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/interfaces/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,12 +1273,12 @@ def _process(drain=0):
12731273
if stdout and isinstance(stdout, bytes):
12741274
try:
12751275
stdout = stdout.decode()
1276-
except:
1276+
except UnicodeDecodeError:
12771277
stdout = stdout.decode("ISO-8859-1")
12781278
if stderr and isinstance(stderr, bytes):
12791279
try:
12801280
stderr = stderr.decode()
1281-
except:
1281+
except UnicodeDecodeError:
12821282
stderr = stderr.decode("ISO-8859-1")
12831283

12841284
result['stdout'] = str(stdout).split('\n')

0 commit comments

Comments
 (0)