[BUG] error in HTTPTestUtil.py
John A Meinel
john at arbash-meinel.com
Tue Oct 25 21:27:13 BST 2005
Alexander Belchenko wrote:
> This traceback is printed 3 times on the screen, not in the log. Running
> latest bzr.dev selftest on Windows 2000 with firewall (is it
> important?). But when firewall was stopped this error also appears.
This isn't a firewall thing specifically. I've started getting this in
other applications under windows, as of the last couple of months.
Specifically, it seems that even though we specifically opened the
socket in blocking mode (we want to wait for user input), it warns us
that the read request would block.
The best thing I can think of is to layer this error on top of the
EAGAIN handling that we already do.
Right now we have:
except socket.error, e:
if e.args[0] == errno.EAGAIN:
time.sleep(0.01)
continue
raise
On my Mac, and on Linux, EAGAIN == EWOULDBLOCK, apparently they are
different in windows. So I would just change the above to be:
except socket.error, e:
if e.args[0] in (errno.EAGAIN, errno.EWOULDBLOCK):
time.sleep(0.01)
continue
raise
Can you make that change and see if it fixes your problem?
John
=:->
>
> Traceback (most recent call last):
> File "C:\Python24\lib\SocketServer.py", line 222, in handle_request
> self.process_request(request, client_address)
> File "C:\Python24\lib\SocketServer.py", line 241, in process_request
> self.finish_request(request, client_address)
> File "C:\Python24\lib\SocketServer.py", line 254, in finish_request
> self.RequestHandlerClass(request, client_address, self)
> File "C:\Python24\lib\SocketServer.py", line 521, in __init__
> self.handle()
> File "C:\Python24\lib\BaseHTTPServer.py", line 316, in handle
> self.handle_one_request()
> File "E:\work\Python\bzr\bzr.dev-win\bzrlib\selftest\HTTPTestUtil.py",
> line 45, in handle_one_request
> self.raw_requestline = self.rfile.readline()
> File "C:\Python24\lib\socket.py", line 340, in readline
> data = self._sock.recv(self._rbufsize)
> error: (10035, 'The socket operation could not complete without blocking')
>
> Alexander
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051025/f602e1aa/attachment.pgp
More information about the bazaar
mailing list