[Piuparts-commits] [piuparts] 01/09: p-r: restrict processing to sections passed on the command line
Holger Levsen
holger at moszumanska.debian.org
Sun Feb 9 20:59:28 UTC 2014
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit c3345100a83102896c0cb2eeadc915f4b11c81f7
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Feb 9 16:31:32 2014 +0100
p-r: restrict processing to sections passed on the command line
for debugging+development only, default (no arguments) means process all sections
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
piuparts-report.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/piuparts-report.py b/piuparts-report.py
index 42f6101..1d6969f 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -3,7 +3,7 @@
#
# Copyright 2005 Lars Wirzenius (liw at iki.fi)
# Copyright 2009-2013 Holger Levsen (holger at layer-acht.org)
-# Copyright © 2011-2013 Andreas Beckmann (anbe at debian.org)
+# Copyright © 2011-2014 Andreas Beckmann (anbe at debian.org)
#
# 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
@@ -1424,16 +1424,14 @@ class Section:
def main():
setup_logging(logging.DEBUG, None)
-
- if len(sys.argv) > 1:
- print 'piuparts-report takes no command line parameters.'
- sys.exit(1)
-
global_config = Config(section="global")
global_config.read(CONFIG_FILE)
if global_config["proxy"]:
os.environ["http_proxy"] = global_config["proxy"]
section_names = global_config["sections"].split()
+ process_section_names = section_names
+ if len(sys.argv) > 1:
+ process_section_names = sys.argv[1:]
master_directory = global_config["master-directory"]
output_directory = global_config["output-directory"]
doc_root = global_config["doc-root"].strip()
@@ -1446,7 +1444,7 @@ def main():
packagedb_cache = {}
write_file(os.path.join(output_directory, "sections.yaml"),
yaml.dump(section_names, default_flow_style=False))
- for section_name in section_names:
+ for section_name in process_section_names:
try:
section = Section(section_name, master_directory, doc_root, packagedb_cache=packagedb_cache)
except MissingSection as e:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list