[Piuparts-commits] [piuparts] 01/06: piuparts-report.py: De-indent global summary func
Holger Levsen
holger at moszumanska.debian.org
Sat Jun 21 12:28:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch submission
in repository piuparts.
commit 71331b6431efd54fb47c4e4414526d77d2462559
Author: David Steele <dsteele at gmail.com>
Date: Wed Apr 30 15:17:52 2014 -0400
piuparts-report.py: De-indent global summary func
Remove four spaces of indent from the body of
generate_global_summary().
---
debian/changelog | 2 ++
piuparts-report.py | 48 ++++++++++++++++++++++++------------------------
2 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 6ca77a5..e5009ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,6 +39,8 @@ piuparts (0.59) UNRELEASED; urgency=low
[ David Steele ]
* dependencyparser.py - Be more lenient about the multi-arch modifiers
accepted and stripped by the parser.
+ * piuparts-report.py:
+ - Fix indentation of generate_global_summary()
-- Holger Levsen <holger at debian.org> Thu, 01 May 2014 00:42:23 +0200
diff --git a/piuparts-report.py b/piuparts-report.py
index 554a56d..fa92a2e 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -1522,34 +1522,34 @@ class Section:
def generate_global_summary(dir, sections):
- json_name = "summary.json"
+ json_name = "summary.json"
- logging.debug("Generating global summary")
+ logging.debug("Generating global summary")
- summary = pkgsummary.new_summary()
+ summary = pkgsummary.new_summary()
- def by_precedence(secname):
- return(by_precedence.section_precedence[secname])
+ def by_precedence(secname):
+ return(by_precedence.section_precedence[secname])
- by_precedence.section_precedence = {}
- count = 0
- for section in sections:
- config = Config(section=section, defaults_section="global")
- config.read(CONFIG_FILE)
- by_precedence.section_precedence[section] = \
- (config["precedence"], count)
- count += 1
-
- for section in sorted(sections, key=by_precedence):
- sec_path = os.path.join(dir, section, json_name)
- if os.path.isfile(sec_path):
- sec_summ = pkgsummary.read_summary(sec_path)
- summary = pkgsummary.merge_summary(summary, sec_summ)
-
- summary_path = os.path.join(dir, json_name)
- if os.path.isfile(summary_path):
- os.unlink(summary_path)
- pkgsummary.write_summary(summary, summary_path)
+ by_precedence.section_precedence = {}
+ count = 0
+ for section in sections:
+ config = Config(section=section, defaults_section="global")
+ config.read(CONFIG_FILE)
+ by_precedence.section_precedence[section] = \
+ (config["precedence"], count)
+ count += 1
+
+ for section in sorted(sections, key=by_precedence):
+ sec_path = os.path.join(dir, section, json_name)
+ if os.path.isfile(sec_path):
+ sec_summ = pkgsummary.read_summary(sec_path)
+ summary = pkgsummary.merge_summary(summary, sec_summ)
+
+ summary_path = os.path.join(dir, json_name)
+ if os.path.isfile(summary_path):
+ os.unlink(summary_path)
+ pkgsummary.write_summary(summary, summary_path)
# START detect_well_known_errors
--
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