[Bug 1176946] [NEW] pycurl.TIMEOUT_MS not work when the value <= 999

Jifeng Yin jifeng.yin at gmail.com
Mon May 6 14:50:30 UTC 2013


Public bug reported:

At first, I'm sorry if this is not a bug( or here is not the right place
to report), and thank you for any response!

===========Code Sample=============
import time
import pycurl

c = pycurl.Curl()
c.setopt(pycurl.URL, 'http://baidu.com/')
start = time.time()
c.setopt(pycurl.TIMEOUT_MS, 999)
try:
    c.perform()
except:
    print "Timeout"
finally:
    print time.time() - start

c = pycurl.Curl()
c.setopt(pycurl.URL, 'http://baidu.com/')
c.setopt(pycurl.TIMEOUT_MS, 999)
c.setopt(pycurl.NOSIGNAL, 1)
c.perform()
print "set NOSIGNAL makes it work"

============OutPut==============
Timeout
0.0002281665802
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
set NOSIGNAL makes it work

============Version=================
system: quantal
python-pycurl version: 7.19.0-5ubuntu1

** Affects: pycurl (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pycurl in Ubuntu.
https://bugs.launchpad.net/bugs/1176946

Title:
  pycurl.TIMEOUT_MS not work when the value <= 999

Status in “pycurl” package in Ubuntu:
  New

Bug description:
  At first, I'm sorry if this is not a bug( or here is not the right
  place to report), and thank you for any response!

  ===========Code Sample=============
  import time
  import pycurl

  c = pycurl.Curl()
  c.setopt(pycurl.URL, 'http://baidu.com/')
  start = time.time()
  c.setopt(pycurl.TIMEOUT_MS, 999)
  try:
      c.perform()
  except:
      print "Timeout"
  finally:
      print time.time() - start

  c = pycurl.Curl()
  c.setopt(pycurl.URL, 'http://baidu.com/')
  c.setopt(pycurl.TIMEOUT_MS, 999)
  c.setopt(pycurl.NOSIGNAL, 1)
  c.perform()
  print "set NOSIGNAL makes it work"

  ============OutPut==============
  Timeout
  0.0002281665802
  <html>
  <meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
  </html>
  set NOSIGNAL makes it work

  ============Version=================
  system: quantal
  python-pycurl version: 7.19.0-5ubuntu1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pycurl/+bug/1176946/+subscriptions




More information about the foundations-bugs mailing list