From 71f71c5b58733bacaa2662cb7e2ab9aa1945b3ac Mon Sep 17 00:00:00 2001 From: volpino Date: Sat, 30 Jun 2012 19:21:43 +0200 Subject: [PATCH] euscanwww: fixed commit_on_success Signed-off-by: volpino --- euscanwww/djeuscan/processing/scan_portage.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/euscanwww/djeuscan/processing/scan_portage.py b/euscanwww/djeuscan/processing/scan_portage.py index fac9c3b..e7c8748 100644 --- a/euscanwww/djeuscan/processing/scan_portage.py +++ b/euscanwww/djeuscan/processing/scan_portage.py @@ -117,12 +117,11 @@ class ScanPortage(object): elif event == "end": # on tag closing if elem.tag == "package": # package tag has been closed, saving everything! - with commit_on_success(): - package = self.store_package(cat, pkg, homepage, - desc) - packages_alive.add('%s/%s' % (cat, pkg)) - for cpv, slot, overlay in versions: - self.store_version(package, cpv, slot, overlay) + package = self.store_package(cat, pkg, homepage, + desc) + packages_alive.add('%s/%s' % (cat, pkg)) + for cpv, slot, overlay in versions: + self.store_version(package, cpv, slot, overlay) # clean old data pkg, homepage, desc = ("", "", "") @@ -261,6 +260,7 @@ class ScanPortage(object): Version.objects.filter(packaged=True, alive=False).delete() +@commit_on_success def scan_portage(packages=None, no_log=False, purge_packages=False, purge_versions=False, prefetch=False, logger=None):