From 2e773c2c46e1dad84a8868d9b546f261adfe9317 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Fri, 12 Jun 2015 00:29:20 +0200 Subject: [PATCH] Don't pass "session" to process_it() Reported-by: Niels Thykier --- dak/process_upload.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dak/process_upload.py b/dak/process_upload.py index 9eb23f00..627c7dde 100755 --- a/dak/process_upload.py +++ b/dak/process_upload.py @@ -454,7 +454,7 @@ def unlink_if_exists(path): if e.errno != errno.ENOENT: raise -def process_it(directory, changes, keyrings, session): +def process_it(directory, changes, keyrings): global Logger print "\n{0}\n".format(changes.filename) @@ -480,6 +480,7 @@ def process_changes(changes_filenames): session = DBConn().session() keyrings = session.query(Keyring).filter_by(active=True).order_by(Keyring.priority) keyring_files = [ k.keyring_name for k in keyrings ] + session.close() changes = [] for fn in changes_filenames: @@ -493,9 +494,7 @@ def process_changes(changes_filenames): changes.sort(key=lambda x: x[1]) for directory, c in changes: - process_it(directory, c, keyring_files, session) - - session.rollback() + process_it(directory, c, keyring_files) ############################################################################### -- 2.39.5