Bazaar-NG doesn't work right with Python 2.4.2

Jan Hudec bulb at ucw.cz
Mon Jan 16 20:05:25 GMT 2006


On Mon, Jan 16, 2006 at 20:15:52 +0100, Radoslaw Szkodzinski wrote:
> John A Meinel wrote:
> > Radoslaw Szkodzinski wrote:
> >> Jan Hudec wrote:
> >>> Can you please give us a more detailed description of your setup, so
> >>> someone can reproduce your problem? Version of bzr and what does your
> >>> http_proxy environment variable look like.
> >> astralstorm at zen ~ $ export | grep HTTP_PROXY
> >> declare -x HTTP_PROXY="192.168.0.1:9191"
> >>
> >> This proxy is of course online. I'm using it for normal HTTP access.
> >> [...]
> >> If you'd like to know anything else, please tell.
[...]
>   File "/usr/lib/python2.4/urllib2.py", line 573, in <lambda>
>     lambda r, proxy=url, type=type, meth=self.proxy_open: \
>   File "/usr/lib/python2.4/urllib2.py", line 580, in proxy_open
>     if '@' in host:
> TypeError: iterable argument required
[...]
> > What little we do seems use 'http_proxy' not HTTP_PROXY, though I don't
> > know that it matters.
> 
> It shouldn't I think.

That might not, but the fact that the value does not include http:// seems
to! Looking through the library code, there is a first regex match which
strips out protocol and then another that gets the host part -- and that one
requires the // to preceede it. So the http_proxy setting really has to be
HTTP_PROXY="http://192.168.0.1:9191"

Note that python recognizes both HTTP_PROXY and http_proxy, as well as any
other capitalization, but some other programs may only accept the lowercase
version. It is certainly more common.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060116/a63f1810/attachment.pgp 


More information about the bazaar mailing list