diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 22:46:58 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-14 22:46:58 +0100 |
commit | 158f6213056c55d5378f8630216ef2ba4e4e1312 (patch) | |
tree | 1b6ed0dca20a34430d88124bf6e9c57a4edc9053 | |
parent | ed21baf4a83e259a57a98940e8c3deb02defd2dd (diff) | |
download | trollius-git-158f6213056c55d5378f8630216ef2ba4e4e1312.tar.gz |
Fix BaseSubprocessTransport.close()
Ignore pipes for which the protocol is not set yet (still equal to None).
-rw-r--r-- | asyncio/base_subprocess.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/asyncio/base_subprocess.py b/asyncio/base_subprocess.py index d607e8d..f5e7dfe 100644 --- a/asyncio/base_subprocess.py +++ b/asyncio/base_subprocess.py @@ -71,6 +71,8 @@ class BaseSubprocessTransport(transports.SubprocessTransport): def close(self): for proto in self._pipes.values(): + if proto is None: + continue proto.pipe.close() if self._returncode is None: self.terminate() |