[Piuparts-commits] [piuparts] 04/09: dwke: switch from print to logging
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 41a2c88adda5048d3252f556a98befd914436c84
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Feb 9 16:57:56 2014 +0100
dwke: switch from print to logging
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
master-bin/detect_well_known_errors.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/master-bin/detect_well_known_errors.py b/master-bin/detect_well_known_errors.py
index 5dd206d..65b3854 100755
--- a/master-bin/detect_well_known_errors.py
+++ b/master-bin/detect_well_known_errors.py
@@ -224,7 +224,7 @@ class FailureManager():
kp.close()
except IOError:
- print "Error processing %s" % get_kpr_path(logpath)
+ logging.error("Error processing %s" % get_kpr_path(logpath))
def parse_kpr_line(self, line):
"""Parse a line in a kpr file into where (e.g. 'pass') and problem name"""
@@ -363,7 +363,7 @@ def make_kprs(logdict, kprdict, problem_list):
kf.close()
except IOError:
- print "File error processing %s" % logpath
+ logging.error("File error processing %s" % logpath)
return len(needs_kpr)
@@ -501,23 +501,23 @@ def detect_well_known_errors(sections, config, problem_list, recheck, recheck_fa
for section in sections:
try:
- print time.strftime("%a %b %2d %H:%M:%S %Z %Y", time.localtime())
- print "%s:" % section
+ logging.info(time.strftime("%a %b %2d %H:%M:%S %Z %Y", time.localtime()))
+ logging.info("%s:" % section)
(del_cnt, add_cnt, failures) = \
process_section(section, config, problem_list,
recheck, recheck_failed)
- print "parsed logfiles: %d removed, %d added" % (del_cnt, add_cnt)
+ logging.info("parsed logfiles: %d removed, %d added" % (del_cnt, add_cnt))
for prob in problem_list:
pcount = len(failures.filtered(prob.name))
if pcount:
- print "%7d %s" % (pcount, prob.name)
+ logging.info("%7d %s" % (pcount, prob.name))
except MissingSection:
pass
- print time.strftime("%a %b %2d %H:%M:%S %Z %Y", time.localtime())
+ logging.info(time.strftime("%a %b %2d %H:%M:%S %Z %Y", time.localtime()))
def create_problem_list(pdir):
@@ -529,7 +529,7 @@ def create_problem_list(pdir):
if prob.valid():
plist.append(prob)
else:
- print "Keyword error in %s - skipping" % pfile
+ logging.error("Keyword error in %s - skipping" % pfile)
return plist
--
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