From b5bc25fc0b7318c86ba4f23d79bb3c6efb16a735 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 23 Mar 2018 01:21:07 +0100 Subject: [PATCH] Fix another windows issue --- jedi/evaluate/compiled/subprocess/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jedi/evaluate/compiled/subprocess/__init__.py b/jedi/evaluate/compiled/subprocess/__init__.py index 6ce4f808..0e8be8e5 100644 --- a/jedi/evaluate/compiled/subprocess/__init__.py +++ b/jedi/evaluate/compiled/subprocess/__init__.py @@ -189,7 +189,9 @@ class _CompiledSubprocess(object): pickle_dump(data, self._process.stdin) except (socket.error, IOError) as e: # Once Python2 will be removed we can just use `BrokenPipeError`. - if e.errno != errno.EPIPE: + # Also, somehow in windows it returns EINVAL instead of EPIPE if + # the subprocess dies. + if e.errno not in (errno.EPIPE, errno.EINVAL): # Not a broken pipe raise self.kill()