From: Ansgar Burchardt Date: Thu, 11 Jun 2015 22:29:20 +0000 (+0200) Subject: Don't pass "session" to process_it() X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=2e773c2c46e1dad84a8868d9b546f261adfe9317;p=dak.git Don't pass "session" to process_it() Reported-by: Niels Thykier --- 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) ###############################################################################