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
commite5e9e827e8b4f0b11276bec3048e86d8b31d1836 (patch)
tree1b6ed0dca20a34430d88124bf6e9c57a4edc9053
parent7806835f9c8c47bdf0d503229abd9f929d99d4f8 (diff)
downloadtrollius-e5e9e827e8b4f0b11276bec3048e86d8b31d1836.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()