summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-14 22:46:58 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-01-14 22:46:58 +0100
commit158f6213056c55d5378f8630216ef2ba4e4e1312 (patch)
tree1b6ed0dca20a34430d88124bf6e9c57a4edc9053
parented21baf4a83e259a57a98940e8c3deb02defd2dd (diff)
downloadtrollius-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.py2
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()