summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@redhat.com>2012-05-09 11:33:24 -0400
committerJosh Boyer <jwboyer@redhat.com>2012-05-09 11:33:24 -0400
commit66b43bc86a19f60b5cee892de52b8b704fdc8787 (patch)
tree58c81bb2a2eb2a830344da90b47c73dc6f57650f
parent9207c57530458afcbbe2650248d83dec570aab8e (diff)
downloadkoji-bisect-66b43bc86a19f60b5cee892de52b8b704fdc8787.zip
koji-bisect-66b43bc86a19f60b5cee892de52b8b704fdc8787.tar.gz
koji-bisect-66b43bc86a19f60b5cee892de52b8b704fdc8787.tar.xz
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-xkoji-bisect.py6
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))