summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-subprocess.rst
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2015-11-02 17:15:47 (GMT)
committerGuido van Rossum <guido@python.org>2015-11-02 17:15:47 (GMT)
commit8778c6b77e52d1ebc1925a0c221de062bec30edf (patch)
tree0f4271c2c8adc83572f007798133bbb6c8055fcc /Doc/library/asyncio-subprocess.rst
parentd65c9496da3485ac077fa8fd374b061afdd3605e (diff)
downloadcpython-8778c6b77e52d1ebc1925a0c221de062bec30edf.zip
cpython-8778c6b77e52d1ebc1925a0c221de062bec30edf.tar.gz
cpython-8778c6b77e52d1ebc1925a0c221de062bec30edf.tar.bz2
Use sys.platform instead of os.name to detect Windows in asyncio docs. Patch by Akira Li.
Diffstat (limited to 'Doc/library/asyncio-subprocess.rst')
-rw-r--r--Doc/library/asyncio-subprocess.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst
index c0704cd..21dae54 100644
--- a/Doc/library/asyncio-subprocess.rst
+++ b/Doc/library/asyncio-subprocess.rst
@@ -12,9 +12,9 @@ On Windows, the default event loop is :class:`SelectorEventLoop` which does not
support subprocesses. :class:`ProactorEventLoop` should be used instead.
Example to use it on Windows::
- import asyncio, os
+ import asyncio, sys
- if os.name == 'nt':
+ if sys.platform == 'win32':
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(loop)