From c9f9331aaf40e0dc271b7b04500fa119a76dae7d Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Mon, 22 Aug 2011 10:46:56 +0200 Subject: [PATCH] euscanwww/commands: don't keep all logs Signed-off-by: Corentin Chary --- euscanwww/euscan/management/commands/scan-upstream.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/euscanwww/euscan/management/commands/scan-upstream.py b/euscanwww/euscan/management/commands/scan-upstream.py index b1c464f..38f6aea 100644 --- a/euscanwww/euscan/management/commands/scan-upstream.py +++ b/euscanwww/euscan/management/commands/scan-upstream.py @@ -105,12 +105,16 @@ class Command(BaseCommand): self.store_result(options, package, log) def store_result(self, options, package, log): + # Remove previous logs + EuscanResult.objects.filter(package=package).delete() + obj = EuscanResult() obj.package = package obj.result = log obj.datetime = datetime.now() obj.save() + def store_package(self, options, cpv): cat, pkg, ver, rev = portage.catpkgsplit(cpv)