summaryrefslogtreecommitdiff
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r--Lib/nntplib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index 0ab51853b5..8951203f32 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -1056,6 +1056,8 @@ class NNTP(_NNTPBase):
raise
def _create_socket(self, timeout):
+ if timeout is not None and not timeout:
+ raise ValueError('Non-blocking socket (timeout=0) is not supported')
sys.audit("nntplib.connect", self, self.host, self.port)
return socket.create_connection((self.host, self.port), timeout)