Kaydet (Commit) f6cc07cf authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Patch #461321: Support None as a timeout in poll2 and poll3.

üst 2777c021
...@@ -110,6 +110,7 @@ def poll2 (timeout=0.0, map=None): ...@@ -110,6 +110,7 @@ def poll2 (timeout=0.0, map=None):
import poll import poll
if map is None: if map is None:
map=socket_map map=socket_map
if timeout is not None:
# timeout is in milliseconds # timeout is in milliseconds
timeout = int(timeout*1000) timeout = int(timeout*1000)
if map: if map:
...@@ -142,6 +143,7 @@ def poll3 (timeout=0.0, map=None): ...@@ -142,6 +143,7 @@ def poll3 (timeout=0.0, map=None):
# Use the poll() support added to the select module in Python 2.0 # Use the poll() support added to the select module in Python 2.0
if map is None: if map is None:
map=socket_map map=socket_map
if timeout is not None:
# timeout is in milliseconds # timeout is in milliseconds
timeout = int(timeout*1000) timeout = int(timeout*1000)
pollster = select.poll() pollster = select.poll()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment