euscanwww: fixed commit_on_success
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
09f0f75a42
commit
71f71c5b58
@ -117,12 +117,11 @@ 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))
|
for cpv, slot, overlay in versions:
|
||||||
for cpv, slot, overlay in versions:
|
self.store_version(package, cpv, slot, overlay)
|
||||||
self.store_version(package, cpv, slot, overlay)
|
|
||||||
|
|
||||||
# clean old data
|
# clean old data
|
||||||
pkg, homepage, desc = ("", "", "")
|
pkg, homepage, desc = ("", "", "")
|
||||||
@ -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):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user