Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10240 from ipython/auto-backport-of-pr-10239
Backport PR #10239 on branch 5.x
  • Loading branch information
takluyver committed Feb 3, 2017
2 parents 0a31c27 + a29fa80 commit b819394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/lib/editorhooks.py
Expand Up @@ -54,7 +54,7 @@ def call_editor(self, filename, line=0):
if sys.platform.startswith('win'):
cmd = shlex.split(cmd)
proc = subprocess.Popen(cmd, shell=True)
if wait and proc.wait() != 0:
if proc.wait() != 0:
raise TryNext()
if wait:
py3compat.input("Press Enter when done editing:")
Expand Down
1 change: 1 addition & 0 deletions IPython/lib/tests/test_editorhooks.py
Expand Up @@ -18,6 +18,7 @@ def fake_popen(*args, **kwargs):
'args': args,
'kwargs': kwargs,
})
return mock.MagicMock(**{'wait.return_value': 0})
editorhooks.install_editor('foo -l {line} -f {filename}', wait=False)

with mock.patch('subprocess.Popen', fake_popen):
Expand Down

0 comments on commit b819394

Please sign in to comment.