]> git.decadent.org.uk Git - dak.git/commitdiff
dak/export_suite.py: same file might be in multiple components
authorAnsgar Burchardt <ansgar@debian.org>
Sun, 4 Nov 2012 15:58:36 +0000 (16:58 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Sun, 4 Nov 2012 15:58:36 +0000 (16:58 +0100)
Use first() instead of one() in case the file is available in multiple
components.

dak/export_suite.py

index 1c22f5e5a80667f5dca78c6e411f4f09f4c26187..b39d343b0fbf30b4c5f9c8a2b6abfd22ed3bd001 100644 (file)
@@ -79,7 +79,7 @@ def main(argv=None):
             af = session.query(ArchiveFile) \
                         .join(ArchiveFile.component).join(ArchiveFile.file) \
                         .filter(ArchiveFile.archive == suite.archive) \
-                        .filter(ArchiveFile.file == f).one()
+                        .filter(ArchiveFile.file == f).first()
             dst = os.path.join(directory, f.basename)
             if not os.path.exists(dst):
                 fs.copy(af.path, dst, symlink=symlink)