PRESUBMIT: UMA histogram check, rewind histograms.xml file between unmatched_histograms searches
BUG=434420, 445265
Review URL: https://codereview.chromium.org/945143006
Cr-Commit-Position: refs/heads/master@{#318049}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 5507aa1..a84f3f9 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -406,6 +406,7 @@
if unmatched_histograms:
with open('tools/metrics/histograms/histograms.xml') as histograms_xml:
for histogram_name, f, line_num in unmatched_histograms:
+ histograms_xml.seek(0)
histogram_name_found = False
for line in histograms_xml:
histogram_name_found = _FindHistogramNameInLine(histogram_name, line)