[csw-devel] SF.net SVN: gar:[20224] csw/mgar/gar/v2/lib/python/package_stats.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Jan 27 17:10:45 CET 2013
Revision: 20224
http://gar.svn.sourceforge.net/gar/?rev=20224&view=rev
Author: wahwah
Date: 2013-01-27 16:05:22 +0000 (Sun, 27 Jan 2013)
Log Message:
-----------
pkgdb: Use mute progressbar when running in debug
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/package_stats.py
Modified: csw/mgar/gar/v2/lib/python/package_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_stats.py 2013-01-27 14:47:14 UTC (rev 20223)
+++ csw/mgar/gar/v2/lib/python/package_stats.py 2013-01-27 16:05:22 UTC (rev 20224)
@@ -6,6 +6,7 @@
import logging
import os
import progressbar
+import mute_progressbar
import re
import sqlobject
@@ -487,9 +488,12 @@
raise PackageError("The length of package list is zero.")
counter = itertools.count(1)
self.logger.info("Juicing the svr4 package stream files...")
- pbar = progressbar.ProgressBar()
- pbar.maxval = total_packages
- pbar.start()
+ if not self.debug:
+ pbar = progressbar.ProgressBar()
+ pbar.maxval = total_packages
+ pbar.start()
+ else:
+ pbar = mute_progressbar.MuteProgressBar()
while stats_list:
# This way objects will get garbage collected as soon as they are removed
# from the list by pop(). The destructor (__del__()) of the srv4 class
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list