diff options
author | Josh Boyer <jwboyer@redhat.com> | 2012-05-09 11:33:24 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@redhat.com> | 2012-05-09 11:33:24 -0400 |
commit | 66b43bc86a19f60b5cee892de52b8b704fdc8787 (patch) | |
tree | 58c81bb2a2eb2a830344da90b47c73dc6f57650f | |
parent | 9207c57530458afcbbe2650248d83dec570aab8e (diff) | |
download | koji-bisect-66b43bc86a19f60b5cee892de52b8b704fdc8787.tar.gz koji-bisect-66b43bc86a19f60b5cee892de52b8b704fdc8787.tar.xz koji-bisect-66b43bc86a19f60b5cee892de52b8b704fdc8787.zip |
Use a progress meter for downloads
At least give the user some kind of clue that we're off doing something
instead of just looking herpyderpy
-rwxr-xr-x | koji-bisect.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/koji-bisect.py b/koji-bisect.py index 9bd2dc9..99ca318 100755 --- a/koji-bisect.py +++ b/koji-bisect.py @@ -6,10 +6,10 @@ import argparse import rpmUtils.miscutils import koji import os -import bisect from functools import cmp_to_key import cPickle import urlgrabber.grabber as grabber +import urlgrabber.progress as progress class Options: debug = True @@ -141,8 +141,10 @@ def download_build(session, build): url = '%s/%s/%s/%s/%s' % (options.pkgurl, info['name'], info['version'], info['release'], fname) urls.append((url, os.path.basename(fname))) + pg = progress.TextMeter() + for url, relpath in urls: - file = grabber.urlopen(url, text=relpath) + file = grabber.urlopen(url, progress_obj=pg, text=relpath) if '/' in relpath: koji.ensuredir(os.path.dirname(relpath)) |