Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2f156457
Commit
2f156457
authored
Mar 02, 2017
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio: Fix trailing whitespace/code style
parent
481cb70a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
Lib/asyncio/subprocess.py
Lib/asyncio/subprocess.py
+2
-2
Lib/test/test_asyncio/test_subprocess.py
Lib/test/test_asyncio/test_subprocess.py
+6
-4
No files found.
Lib/asyncio/subprocess.py
View file @
2f156457
...
...
@@ -89,7 +89,7 @@ class SubprocessStreamProtocol(streams.FlowControlMixin,
reader
.
feed_eof
()
else
:
reader
.
set_exception
(
exc
)
if
fd
in
self
.
_pipe_fds
:
self
.
_pipe_fds
.
remove
(
fd
)
self
.
_maybe_close_transport
()
...
...
@@ -97,7 +97,7 @@ class SubprocessStreamProtocol(streams.FlowControlMixin,
def
process_exited
(
self
):
self
.
_process_exited
=
True
self
.
_maybe_close_transport
()
def
_maybe_close_transport
(
self
):
if
len
(
self
.
_pipe_fds
)
==
0
and
self
.
_process_exited
:
self
.
_transport
.
close
()
...
...
Lib/test/test_asyncio/test_subprocess.py
View file @
2f156457
...
...
@@ -468,9 +468,11 @@ class SubprocessMixin:
'sys.stdout.flush()'
,
'sys.exit(1)'
])
fut
=
asyncio
.
create_subprocess_exec
(
sys
.
executable
,
'-c'
,
code
,
stdout
=
asyncio
.
subprocess
.
PIPE
,
loop
=
self
.
loop
)
fut
=
asyncio
.
create_subprocess_exec
(
sys
.
executable
,
'-c'
,
code
,
stdout
=
asyncio
.
subprocess
.
PIPE
,
loop
=
self
.
loop
)
process
=
yield
from
fut
while
True
:
data
=
yield
from
process
.
stdout
.
read
(
65536
)
...
...
@@ -480,7 +482,7 @@ class SubprocessMixin:
break
self
.
loop
.
run_until_complete
(
execute
())
if
sys
.
platform
!=
'win32'
:
# Unix
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment