From b3e8354cdff4af8117feda0806a7c1104d5bb30e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 24 May 2010 11:29:35 -0500 Subject: reporead: use the DB package we already have Rather than go to the database for every single package on something like a files update, use the one we already have. Duh. Signed-off-by: Dan McGee --- devel/management/commands/reporead.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'devel/management/commands') diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index ee60684..6e71c26 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -266,14 +266,12 @@ def db_update(archname, reponame, pkgs, options): continue else: timestamp = datetime.now() - pkg = Package.objects.get( - pkgname=p.name,arch=architecture, repo=repository) if filesonly: - logger.info("Possibly populating files for package %s in database", p.name) - populate_files(pkg, p) + logger.debug("Checking files for package %s in database", p.name) + populate_files(dbp, p) else: logger.info("Updating package %s in database", p.name) - populate_pkg(pkg, p, force=force, timestamp=timestamp) + populate_pkg(dbp, p, force=force, timestamp=timestamp) logger.info('Finished updating Arch: %s' % archname) -- cgit v1.2.3-24-g4f1b