summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-09-01 09:12:52 (GMT)
committerGitHub <noreply@github.com>2019-09-01 09:12:52 (GMT)
commit5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe (patch)
tree2a3eee6b520cafadc4c3b950e73bad0c0b1aa5ce /Lib/asyncore.py
parenteb8974616bc58f44b2a3c3e4ca2326894ae42c8f (diff)
downloadcpython-5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe.zip
cpython-5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe.tar.gz
cpython-5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe.tar.bz2
bpo-15999: Always pass bool instead of int to socket.setblocking(). (GH-15621)
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 0e92be3..ce16f11 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -228,7 +228,7 @@ class dispatcher:
if sock:
# Set to nonblocking just to make sure for cases where we
# get a socket from a blocking source.
- sock.setblocking(0)
+ sock.setblocking(False)
self.set_socket(sock, map)
self.connected = True
# The constructor no longer requires that the socket
@@ -280,7 +280,7 @@ class dispatcher:
def create_socket(self, family=socket.AF_INET, type=socket.SOCK_STREAM):
self.family_and_type = family, type
sock = socket.socket(family, type)
- sock.setblocking(0)
+ sock.setblocking(False)
self.set_socket(sock)
def set_socket(self, sock, map=None):