Show More
@@ -218,6 +218,11 b' def ipexec(fname, options=None, commands=()):' | |||||
218 | full_cmd = ipython_cmd + cmdargs + [full_fname] |
|
218 | full_cmd = ipython_cmd + cmdargs + [full_fname] | |
219 | env = os.environ.copy() |
|
219 | env = os.environ.copy() | |
220 | env.pop('PYTHONWARNINGS', None) # Avoid extraneous warnings appearing on stderr |
|
220 | env.pop('PYTHONWARNINGS', None) # Avoid extraneous warnings appearing on stderr | |
|
221 | for k, v in env.items(): | |||
|
222 | # Debug a bizarre failure we've seen on Windows: | |||
|
223 | # TypeError: environment can only contain strings | |||
|
224 | if not isinstance(v, str): | |||
|
225 | print(v) | |||
221 | p = Popen(full_cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE, env=env) |
|
226 | p = Popen(full_cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE, env=env) | |
222 | out, err = p.communicate(input=py3compat.str_to_bytes('\n'.join(commands)) or None) |
|
227 | out, err = p.communicate(input=py3compat.str_to_bytes('\n'.join(commands)) or None) | |
223 | out, err = py3compat.bytes_to_str(out), py3compat.bytes_to_str(err) |
|
228 | out, err = py3compat.bytes_to_str(out), py3compat.bytes_to_str(err) |
General Comments 0
You need to be logged in to leave comments.
Login now