euscanwww/commands: don't keep all logs

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
Corentin Chary 2011-08-22 10:46:56 +02:00
parent 03a7a0a277
commit c9f9331aaf

View File

@ -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)