Mail Archives: cygwin/2006/06/15/14:27:50
------=_Part_11188_17681104.1150396055333
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
The attached python script works fine under python-2.4.1-1. Under
python-2.4.3-1, I get this output:
Using urllib.urlopen
......................................................................................................................................................
Using urllib2.urlopen
.............................................................................................Traceback
(most recent call last):
File "test-urllib.py", line 42, in ?
doRequest2("http://localhost:8010")
File "test-urllib.py", line 16, in doRequest2
f = urllib2.urlopen(url)
File "/usr/lib/python2.4/urllib2.py", line 130, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.4/urllib2.py", line 358, in open
response = self._open(req, data)
File "/usr/lib/python2.4/urllib2.py", line 376, in _open
'_open', req)
File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib/python2.4/urllib2.py", line 1021, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.4/urllib2.py", line 996, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error unable to select on socket>
This happens after a consistent number of requests on my machine.
Cheers,
Chris
------=_Part_11188_17681104.1150396055333
Content-Type: text/x-python; name=test-urllib.py; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: base64
X-Attachment-Id: f_eohaywoj
Content-Disposition: attachment; filename="test-urllib.py"
IyEvdXNyL2Jpbi9weXRob24KaW1wb3J0IHVybGxpYjIsIHVybGxpYiwgQmFz
ZUhUVFBTZXJ2ZXIsIG9zLCBzeXMsIHNpZ25hbApjbGFzcyBNeUhhbmRsZXIo
QmFzZUhUVFBTZXJ2ZXIuQmFzZUhUVFBSZXF1ZXN0SGFuZGxlcik6CiAgICBk
ZWYgZG9fR0VUKHNlbGYpOgogICAgICAgIGRhdGEgPSAiSGVsbG8gd29ybGQi
CiAgICAgICAgc2VsZi53ZmlsZS53cml0ZSgiSFRUUC8xLjAgMjAwIE9LXG5D
b250ZW50LUxlbmd0aDogJXNcblxuJXMiICUgKAogICAgICAgICAgIC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------=_Part_11188_17681104.1150396055333
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
------=_Part_11188_17681104.1150396055333--
- Raw text -