Commit 01b67284 authored by Caitlin Fischer's avatar Caitlin Fischer Committed by Commit Bot

Removes one of the two constants for the same string.

Change-Id: I8940a62ceb8d6586a9551607aaaa9e0b63fcac9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731989
Auto-Submit: Caitlin Fischer <caitlinfischer@google.com>
Commit-Queue: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683587}
parent 89da2b3f
......@@ -4,7 +4,7 @@
"""Functions for extracting email addresses from OWNERS files."""
import histogram_ownership
import extract_histograms
import os
import re
......@@ -196,7 +196,7 @@ def ExpandHistogramsOWNERS(histograms):
is_email = email_pattern.match(owner_text)
is_primary_owner = (is_email or
owner_text == histogram_ownership.DUMMY_OWNER)
owner_text == extract_histograms.OWNER_PLACEHOLDER)
if index == 0 and not is_primary_owner:
raise Error('The histogram {} must have a primary owner, i.e. an '
'individual\'s email address.'
......
......@@ -7,6 +7,7 @@
histograms.
"""
import extract_histograms
import os
import sys
import xml.etree.ElementTree
......@@ -14,8 +15,6 @@ import xml.etree.ElementTree
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common'))
import path_util
DUMMY_OWNER = "Please list the metric's owners. Add more owner tags as needed."
def main():
tree = xml.etree.ElementTree.parse(path_util.GetHistogramsFile())
root = tree.getroot()
......@@ -42,7 +41,7 @@ def main():
continue
if node.tag != 'owner':
continue
if node.text == DUMMY_OWNER:
if node.text == extract_histograms.OWNER_PLACEHOLDER:
continue
assert '@' in node.text
owners.append(node.text)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment