Message205875
| Author |
gregory.p.smith |
| Recipients |
Reuben.D'Netto, gregory.p.smith, neologix, orsenthil, serhiy.storchaka |
| Date |
2013年12月11日.02:09:19 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1386727760.8.0.510071400806.issue17200@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Review comments added. I don't really see why the fix should not be as trivial as:
diff -r ca9bca7aecda Lib/telnetlib.py
--- a/Lib/telnetlib.py Tue Dec 10 16:06:46 2013 -0600
+++ b/Lib/telnetlib.py Tue Dec 10 18:08:37 2013 -0800
@@ -312,7 +312,9 @@
poller.register(self, poll_in_or_priority_flags)
while i < 0 and not self.eof:
try:
- ready = poller.poll(call_timeout)
+ # Poll takes its timeout in milliseconds.
+ ready = poller.poll(None if timeout is None
+ else 1000 * call_timeout)
except select.error as e:
if e.errno == errno.EINTR:
if timeout is not None:
@@ -682,7 +684,8 @@
poller.register(self, poll_in_or_priority_flags)
while not m and not self.eof:
try:
- ready = poller.poll(call_timeout)
+ ready = poller.poll(None if timeout is None
+ else 1000 * call_timeout)
except select.error as e:
if e.errno == errno.EINTR:
if timeout is not None: |
|