From owner-freebsd-gnome@FreeBSD.ORG Tue Dec 7 02:13:45 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC88A16A4CE for ; Tue, 7 Dec 2004 02:13:45 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DC3443D76 for ; Tue, 7 Dec 2004 02:13:43 +0000 (GMT) (envelope-from hyeshik@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so297711rng for ; Mon, 06 Dec 2004 18:13:42 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=o+eNTSH/wPG0EUaZIAujBEVrDKfXmYyttjqvAZ/gPLSHg9HdvJUKoFJYK1ArwG76VBuOOlzukjnY0LJm8PM9M3r3imqttgPJoQYIRLCoLnVPHfKsgd+bNQsq/fKPf0NMjTiYt6fgMO+Zqr+Cw26cb+r+ueWCONk5LH/pEsnC+BQ= Received: by 10.38.76.61 with SMTP id y61mr820280rna; Mon, 06 Dec 2004 18:13:42 -0800 (PST) Received: by 10.39.1.73 with HTTP; Mon, 6 Dec 2004 18:13:42 -0800 (PST) Message-ID: <4f0b69dc04120618134047d8e6@mail.gmail.com> Date: Tue, 7 Dec 2004 11:13:42 +0900 From: Hye-Shik Chang To: Randy Pratt In-Reply-To: <20041206140142.24a01461.rpratt1950@earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20041206140142.24a01461.rpratt1950@earthlink.net> cc: gnome@freebsd.org cc: Jeremy Messenger Subject: Re: net/gnome-btdownload problem with python-2.4 update X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Hye-Shik Chang List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2004 02:13:46 -0000 On Mon, 6 Dec 2004 14:01:42 -0500, Randy Pratt 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. --- 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