practracker: Move the warning/error distinction to a higher level.

Previously warnings were generated by magic inside ProblemVault; now
they're printed on demand.
This commit is contained in:
Nick Mathewson
2019-07-30 10:17:47 -04:00
parent bcef6a5802
commit 65cb4fead5
2 changed files with 26 additions and 14 deletions
+5 -1
View File
@@ -204,8 +204,12 @@ def main(argv):
# 3) Go through all the files and report problems if they are not exceptions
found_new_issues = 0
for item in FILTER.filter(consider_all_metrics(files_list)):
if ProblemVault.register_problem(item):
status = ProblemVault.register_problem(item)
if status == problem.STATUS_ERR:
print(item)
found_new_issues += 1
elif status == problem.STATUS_WARN:
item.warn()
if args.regen:
tmpfile.close()