From 1d8e87482fb9afc3cdcf396cea14e41cec16130f Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Fri, 30 Sep 2011 09:10:56 +0200 Subject: [PATCH] euscanwww: remove progress stuff Signed-off-by: Corentin Chary --- .../management/commands/scan-metadata.py | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/euscanwww/euscan/management/commands/scan-metadata.py b/euscanwww/euscan/management/commands/scan-metadata.py index a7d207c..863e36e 100644 --- a/euscanwww/euscan/management/commands/scan-metadata.py +++ b/euscanwww/euscan/management/commands/scan-metadata.py @@ -14,8 +14,6 @@ from euscanwww.euscan.models import Package, Herd, Maintainer from gentoolkit.query import Query from gentoolkit.errors import GentoolkitFatalError -from progressbar import ProgressBar, Bar, ETA, Percentage - class Command(BaseCommand): _overlays = {} @@ -30,11 +28,6 @@ class Command(BaseCommand): dest='quiet', default=False, help='Be quiet'), - make_option('--progress', - action='store_true', - dest='progress', - default=False, - help='Display progress'), ) args = '' help = 'Scans metadata and fills database' @@ -43,35 +36,12 @@ class Command(BaseCommand): if len(args) == 0 and options['all'] == False: raise CommandError('You must specify a package or use --all') - if not self.stdout.isatty(): - options['progress'] = False - - if options['progress']: - widgets = ['Scanning metadata: ', Percentage(), ' ', Bar(), ' ', ETA()] - if len(args): - count = len(args) - else: - count = Package.objects.count() - pbar = ProgressBar(widgets=widgets, maxval=count).start() - i = 0 - else: - pbar = None - if len(args) == 0: for pkg in Package.objects.all(): self.scan(options, '%s/%s' % (pkg.category, pkg.name)) - if pbar: - pbar.update(i) - i += 1 else: for package in args: self.scan(options, package) - if pbar: - pbar.update(i) - i += 1 - - if pbar: - pbar.finish() @commit_on_success def scan(self, options, query=None):