[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] show-new: open a new session for every source package



Signed-off-by: Torsten Werner <twerner@debian.org>
---
 dak/show_new.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dak/show_new.py b/dak/show_new.py
index 5c7e886..9e216c5 100755
--- a/dak/show_new.py
+++ b/dak/show_new.py
@@ -143,7 +143,8 @@ def html_footer():
 ################################################################################
 
 
-def do_pkg(changes_file, session):
+def do_pkg(changes_file):
+    session = DBConn().session()
     u = Upload()
     u.pkg.changes_file = changes_file
     (u.pkg.changes["fingerprint"], rejects) = utils.check_signature(changes_file)
@@ -194,6 +195,7 @@ def do_pkg(changes_file, session):
         if sys.stdout != stdout_fd:
             sys.stdout.close()
             sys.stdout = stdout_fd
+    session.close()
 
 ################################################################################
 
@@ -245,7 +247,7 @@ def main():
         if not changes_file:
             continue
         print "\n" + changes_file
-        do_pkg (changes_file, session)
+        do_pkg (changes_file)
 
     files = set(os.listdir(cnf["Show-New::HTMLPath"]))
     to_delete = filter(lambda x: x.endswith(".html"), files.difference(sources))
-- 
1.5.6.5


Reply to: