Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 2004 23:25:20 -0500
From:      Randy Pratt <rpratt1950@earthlink.net>
To:        Hye-Shik Chang <hyeshik@gmail.com>
Cc:        mezz@freebsd.org
Subject:   Re: net/gnome-btdownload problem with python-2.4 update
Message-ID:  <20041206232520.72e79493.rpratt1950@earthlink.net>
In-Reply-To: <4f0b69dc04120618134047d8e6@mail.gmail.com>
References:  <20041206140142.24a01461.rpratt1950@earthlink.net> <4f0b69dc04120618134047d8e6@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 7 Dec 2004 11:13:42 +0900
Hye-Shik Chang <hyeshik@gmail.com> wrote:

> On Mon, 6 Dec 2004 14:01:42 -0500, Randy Pratt <rpratt1950@earthlink.net> wrote:
> > The net/gnome-btdownload builds and installs fine but has some
> > run-time issues after the latest python-2.4 update:
> > 
> > $ gnome-btdownload sample.torrent &
> > [1] 67064
> > bash-2.05b$ /usr/X11R6/bin/gnome-btdownload:713: DeprecationWarning: gtk.Progress.set_percentage is deprecated, use gtk.ProgressBar methods
> >   progressbar_download_status.set_percentage(dict['fractionDone'])
> > Exception in thread Thread-1:
> > Traceback (most recent call last):
> >   File "/usr/local/lib/python2.4/threading.py", line 442, in __bootstrap
> >     self.run()
> >   File "/usr/local/lib/python2.4/threading.py", line 422, in run
> >     self.__target(*self.__args, **self.__kwargs)
> >   File "/usr/local/lib/python2.4/site-packages/BitTorrent/Rerequester.py", line 85, in rerequest
> >     h = urlopen(url)
> >   File "/usr/local/lib/python2.4/urllib2.py", line 130, in urlopen
> >     return _opener.open(url, data)
> >   File "/usr/local/lib/python2.4/urllib2.py", line 364, in open
> >     response = meth(req, response)
> >   File "/usr/local/lib/python2.4/urllib2.py", line 468, in http_response
> >     code, msg, hdrs = response.code, response.msg, response.info()
> > AttributeError: addinfourldecompress instance has no attribute 'code'
> > 
> 
> This patch may help.  Please let me know if you encounter another problem.

I should be able to test this by tomorrow and let you know how
it worked.

I appreciate your taking a look at this. Thanks!

Best regards,

Randy

> --- BitTorrent/zurllib.py.orig  Mon Dec  6 21:38:20 2004
> +++ BitTorrent/zurllib.py       Mon Dec  6 21:41:30 2004
> @@ -35,7 +35,10 @@
>          if DEBUG:
>               pprint.pprint(headers.dict)
>          url = fp.url
> -        return addinfourldecompress(fp, headers, url)
> +        resp = addinfourldecompress(fp, headers, url)
> +        resp.code = fp.code
> +        resp.msg = fp.msg
> +        return resp
> 
> 
> Hye-Shik


-- 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041206232520.72e79493.rpratt1950>