---
 repoquery.py |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/repoquery.py b/repoquery.py
index 15990b4..5227788 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -811,11 +811,16 @@ def main(args):
         
     # Show what is going on, if --quiet is not set.
     if not opts.quiet and sys.stdout.isatty():
-        repoq.repos.setProgressBar(TextMeter(fo=sys.stdout))
-        repoq.repos.callback = output.CacheProgressCallback()
         yumout = output.YumOutput()
         freport = ( yumout.failureReport, (), {} )
-        repoq.repos.setFailureCallback( freport )       
+        if hasattr(repoq, 'prerepoconf'):
+            repoq.prerepoconf.progressbar = TextMeter(fo=sys.stdout)
+            repoq.prerepoconf.callback = output.CacheProgressCallback()
+            repoq.prerepoconf.failure_callback = freport
+        else:
+            repoq.repos.setProgressBar(TextMeter(fo=sys.stdout))
+            repoq.repos.callback = output.CacheProgressCallback()
+            repoq.repos.setFailureCallback(freport)
     
     if not repoq.setCacheDir(opts.tempcache):
         repoq.logger.error("Error: Could not make cachedir, exiting")
-- 
1.7.0.1

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to