From: Torsten Werner Date: Sat, 19 Feb 2011 23:46:28 +0000 (+0100) Subject: Fix session handling in queue-report. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=163369d3a452071eaa159cca4b8a76b063823af6;p=dak.git Fix session handling in queue-report. Signed-off-by: Torsten Werner --- 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