From 8d69857ef2e89af1a4dcaa069527d7a8efbece89 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Tue, 3 Feb 2009 20:55:26 +0100 Subject: [PATCH] make_pkg_file_mapping add the funny quote weasel missed use row as variable name, not the too clearly named i do use the new docstring foo. Signed-off-by: Joerg Jaspert --- dak/make_pkg_file_mapping.py | 51 ++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/dak/make_pkg_file_mapping.py b/dak/make_pkg_file_mapping.py index 1eb0f899..60c39d3e 100755 --- a/dak/make_pkg_file_mapping.py +++ b/dak/make_pkg_file_mapping.py @@ -1,25 +1,15 @@ #!/usr/bin/env python -import os -import pg -import sys -from daklib import database -from daklib import utils - -################################################################################ +""" +Prints out, for every file in the pool, which source package and version it +belongs to and for binary packages additionally which arch, binary package +and binary package version it has in a standard rfc2822-like format. -projectB = None #: database connection, pgobject +@contact: Debian FTP Master +@copyright: 2009 Peter Palfrader +@license: GNU General Public License version 2 or later +""" -################################################################################ - -# Usage: dak make-pkg_file_mapping -# -# Prints out, for every file in the pool, which source package and version it -# belongs to and for binary packages additionally which arch, binary package -# and binary package version it has in a standard rfc2822-like format. - -# Copyright 2009 Peter Palfrader -# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -34,6 +24,23 @@ projectB = None #: database connection, pgobject # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +################################################################################ + +# it's crypto -- think of it like magic if you like. + +################################################################################ + +import os +import pg +import sys +from daklib import database +from daklib import utils + +################################################################################ + +projectB = None #: database connection, pgobject + ################################################################################ def build_mapping(): @@ -67,15 +74,15 @@ def build_mapping(): ORDER BY source, version, package, bin_version """ - for i in projectB.query(query_sources).getresult(): - (source, version, path) = i + for row in projectB.query(query_sources).getresult(): + (source, version, path) = row print "Path: %s"%path print "Source: %s"%source print "Source-Version: %s"%version print - for i in projectB.query(query_binaries).getresult(): - (source, version, arch, path, bin, binv) = i + for row in projectB.query(query_binaries).getresult(): + (source, version, arch, path, bin, binv) = row print "Path: %s"%path print "Source: %s"%source print "Source-Version: %s"%version -- 2.39.2