euscanwww: fixed commit_on_success

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino 2012-06-30 19:21:43 +02:00
parent 09f0f75a42
commit 71f71c5b58

View File

@ -117,7 +117,6 @@ class ScanPortage(object):
elif event == "end": # on tag closing elif event == "end": # on tag closing
if elem.tag == "package": if elem.tag == "package":
# package tag has been closed, saving everything! # package tag has been closed, saving everything!
with commit_on_success():
package = self.store_package(cat, pkg, homepage, package = self.store_package(cat, pkg, homepage,
desc) desc)
packages_alive.add('%s/%s' % (cat, pkg)) packages_alive.add('%s/%s' % (cat, pkg))
@ -261,6 +260,7 @@ class ScanPortage(object):
Version.objects.filter(packaged=True, alive=False).delete() Version.objects.filter(packaged=True, alive=False).delete()
@commit_on_success
def scan_portage(packages=None, no_log=False, purge_packages=False, def scan_portage(packages=None, no_log=False, purge_packages=False,
purge_versions=False, prefetch=False, logger=None): purge_versions=False, prefetch=False, logger=None):