Merge pull request #632 from scopatz/strtn

capturing redirection fix
This commit is contained in:
Gil Forsyth 2016-01-15 17:45:25 -05:00
commit 6d2a82027b
2 changed files with 3 additions and 1 deletions

View file

@ -47,6 +47,8 @@ None
* Fixed issue with job management if a TTY existed but was not controlled
by the process, posix only.
* Jupyter kernel no longer times out when using foreign shells on startup.
* Capturing redirections, e.g. ``$(echo hello > f.txt)``, no longer fails
with a decoding error.
**Security:**

View file

@ -625,7 +625,7 @@ def run_subproc(cmds, captured=True):
hist.last_cmd_rtn = prev_proc.returncode
if write_target is None:
# get output
output = ''
output = b''
if prev_proc.stdout not in (None, sys.stdout):
output = prev_proc.stdout.read()
if captured: