it looks like someone broke http:// in dev
John Arbash Meinel
john at arbash-meinel.com
Sat Feb 7 18:09:02 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marius Kruger wrote:
> I'm posting it here for in case somebody else can figure out and fix
> this before I get around to it.
> (bialix is very demanding today :)
>
> this works:
>
> $ bzr info lp:bzr
> Repository branch (format: unnamed)
> Location:
> shared repository: bzr+ssh://bazaar.launchpad.net/%7Ebzr/bzr/trunk/
> <http://bazaar.launchpad.net/%7Ebzr/bzr/trunk/>
> repository branch: bzr+ssh://bazaar.launchpad.net/%7Ebzr/bzr/trunk/
> <http://bazaar.launchpad.net/%7Ebzr/bzr/trunk/>
>
> Related branches:
> parent branch: http://bazaar-ng.org/bzr/bzr.dev/
>
>
>
> but this doesn't:
>
> $ bzr info
> https://code.launchpad.net/~bzr/bzr/trunk
>
> bzr: ERROR: exceptions.TypeError: readline() takes exactly 1 argument (2
> given)
...
> File "/usr/lib/python2.5/httplib.py", line 343, in
> _read_status
> line =
> self.fp.readline()
>
> File
> "/stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/transport/http/_urllib2_wrappers.py",
> line 83, in readline
> s =
> self.filesock.readline(size)
>
> TypeError: readline() takes exactly 1 argument (2
> given)
>
Given the location, I would guess Vincent's recent patch to change how
we track bytes read/written to sockets broke this. I also wonder if it
has to do with http versus https. If only because I've been using
bzr.dev with http quite a bit, though not with 'bzr info'.
Certainly it is Vincent's new code that is the problem. I wonder if
'readline' is ever supposed to take a 'size' argument.
I can say that SSLFile.readline() doesn't take a size argument, which is
probably where this is coming from.
The easy fix is:
=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
- --- bzrlib/transport/http/_urllib2_wrappers.py 2009-01-29 14:27:28 +0000
+++ bzrlib/transport/http/_urllib2_wrappers.py 2009-02-07 18:08:47 +0000
@@ -79,8 +79,8 @@
self._report_activity(len(s), 'read')
return s
- - def readline(self, size=-1):
- - s = self.filesock.readline(size)
+ def readline(self):
+ s = self.filesock.readline()
self._report_activity(len(s), 'read')
return s
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmNzj0ACgkQJdeBCYSNAAOn/gCfbX+E1mL509V94wZd5mpU6fyp
EQAAn28Dq0n5ZqR309xBSptCxPxCAC5u
=7VfN
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list