Skip to content

Commit

Permalink
Avoid errors in select() calls in stdlib-samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
Guido van Rossum committed Mar 24, 2017
1 parent 5434979 commit a911b86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test-data/stdlib-samples/3.2/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ def _communicate_with_select(self, input: Any) -> Tuple[List[bytes],
input_offset = 0
while read_set or write_set:
try:
rlist, wlist, xlist = select.select(read_set, write_set, [])
rlist, wlist, xlist = select.select(read_set, write_set, cast(List[object], []))
except select.error as e:
if e.args[0] == errno.EINTR:
continue
Expand Down
2 changes: 1 addition & 1 deletion test-data/stdlib-samples/3.2/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ def kill_p2() -> None:
p1.stdin.write(data)
p1.stdin.close()

readfiles, ignored1, ignored2 = select.select([p2.stdout], [], [], 10)
readfiles, ignored1, ignored2 = select.select([p2.stdout], cast(List[object], []), cast(List[object], []), 10)

self.assertTrue(readfiles, "The child hung")
self.assertEqual(p2.stdout.read(), data)
Expand Down

0 comments on commit a911b86

Please sign in to comment.