From 163369d3a452071eaa159cca4b8a76b063823af6 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Sun, 20 Feb 2011 00:46:28 +0100 Subject: [PATCH] Fix session handling in queue-report. Signed-off-by: Torsten Werner --- dak/queue_report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dak/queue_report.py b/dak/queue_report.py index d3777a27..19673d55 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -358,7 +358,6 @@ RRA:MAX:0.5:288:795 ############################################################ def process_changes_files(changes_files, type, log, rrd_dir): - #session = DBConn().session() msg = "" cache = {} # Read in all the .changes files @@ -431,7 +430,9 @@ def process_changes_files(changes_files, type, log, rrd_dir): for j in i[1]["list"]: changesbase = os.path.basename(j["filename"]) try: + session = DBConn().session() dbc = session.query(DBChange).filter_by(changesname=changesbase).one() + session.close() except Exception, e: print "Can't find changes file in NEW for %s (%s)" % (changesbase, e) dbc = None -- 2.39.5