]> git.decadent.org.uk Git - dak.git/commitdiff
Make getArchAll() multithread safe.
authorTorsten Werner <twerner@debian.org>
Fri, 25 Mar 2011 13:29:16 +0000 (13:29 +0000)
committerTorsten Werner <twerner@debian.org>
Fri, 25 Mar 2011 13:29:16 +0000 (13:29 +0000)
Signed-off-by: Torsten Werner <twerner@debian.org>
daklib/lists.py

index e7f8bf968c442f3f094285d00a23566d310bb031..320184e3934d19f6253bc713fe06da0e8f84cda0 100755 (executable)
@@ -64,7 +64,8 @@ def getArchAll(suite, component, architecture, type, session, timestamp = None):
     full pathname to the u(deb) file. See function writeAllList() in
     dak/generate_filelist.py for an example that uses this function.
     '''
-    query = suite.binaries.filter_by(architecture = architecture, binarytype = type)
+    query = suite.clone(session).binaries. \
+        filter_by(architecture = architecture, binarytype = type)
     if timestamp is not None:
         extra_cond = 'extract(epoch from bin_associations.created) > %d' % timestamp
         query = query.filter(extra_cond)