From: Ansgar Burchardt Date: Sun, 4 Nov 2012 15:58:36 +0000 (+0100) Subject: dak/export_suite.py: same file might be in multiple components X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b53d42b509836e9b3a599e5b99590c386c402886;p=dak dak/export_suite.py: same file might be in multiple components Use first() instead of one() in case the file is available in multiple components. --- diff --git a/dak/export_suite.py b/dak/export_suite.py index 1c22f5e5..b39d343b 100644 --- a/dak/export_suite.py +++ b/dak/export_suite.py @@ -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)