[Yum-devel] [UG] Progress Bar + SSL Problem

James Antill james at fedoraproject.org
Wed Oct 13 12:12:31 UTC 2010


On Mon, 2010-10-11 at 21:45 -0400, John Reese wrote:
> Hello,
> 
> I apologize if I'm asking questions that have answers elsewhere, but looking at
> the documentation and google searching has not helped.  I'm trying to migrate
> from using Python's urllib2 module to urlgrabber, for both the progress bar
> feature and the simple urlgrab() function.  However, I've come across two
> problems, and am hoping someone on this list might be able to point me in the
> right directions.
> 
> For context, I'm running Ubuntu 10.10 with the default 'python' (2.6.6) and
> 'python-urlgrabber' (3.1.0) packages.

 urlgrabber-3.1.0 is pretty old now, and is still using urilib2.

> 1. First, when dealing with the progress bar, I seem to have a problem where the
> progress bar only shows up *after* the file has been completely downloaded and
> the file handle has been close()'d.  Even trying to use it in a basic context
> seems to prove unhelpful:
> 
>    po = urlgrabber.progress.TextMeter()
>    f = urlgrabber.urlgrab("...", progress_obj=po)

 That should work. Is sys.stdout anything weird? Does
"running" /usr/lib/python2.6/site-packages/urlgrabber/progress.py show
progress output?
 Does running the urlgrabber command with -p show progress?

> 2. Urlgrabber requests throw a nasty exception/stack trace when requesting
> anything over HTTPS/SSL: http://pastebin.com/Ku3PyJze -- is there a
> fix/workaround for this, or should I use a different version of the module?  Or
> am I missing something again?

 I'd upgrade to a newer urlgrabber which uses pycurl.



More information about the Yum-devel mailing list