]> err.no Git - dak/commitdiff
session fixups in queue.py
authorMark Hymers <mhy@debian.org>
Sun, 2 Aug 2009 14:31:29 +0000 (15:31 +0100)
committerMark Hymers <mhy@debian.org>
Sun, 9 Aug 2009 15:49:30 +0000 (16:49 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
daklib/queue.py

index ff7247ceede91ec35a3e5bd865306cf94ca2d484..a1dcdf3ce0efb6edfe2b74830e6d6decd89d7248 100755 (executable)
@@ -1950,7 +1950,7 @@ distribution."""
                                        file, version, sourceful=True)
 
     ################################################################################
-    def check_dsc_against_db(self, file):
+    def check_dsc_against_db(self, file, session=None):
         """
 
         @warning: NB: this function can remove entries from the 'files' index [if
@@ -1960,6 +1960,10 @@ distribution."""
          ensure you haven't just tried to dereference the deleted entry.
 
         """
+
+        if session is None:
+            session = DBConn().session()
+
         self.pkg.orig_tar_gz = None
 
         # Try and find all files mentioned in the .dsc.  This has
@@ -2012,7 +2016,7 @@ distribution."""
 
             elif dsc_name.endswith(".orig.tar.gz"):
                 # Check in the pool
-                ql = get_poolfile_like_name(dsc_name)
+                ql = get_poolfile_like_name(dsc_name, session)
 
                 # Strip out anything that isn't '%s' or '/%s$'
                 # TODO: Shouldn't we just search for things which end with our string explicitly in the SQL?