From dfb806c896aaf25c89c86b114f0b3f03ae3ab514 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 26 Sep 2014 14:42:42 +0000 Subject: [PATCH] Ignore extra-atcs lines which look like comments Change-Id: I8054f4582ad93a5dd31a2d5de288250780ebbf3f --- tools/atc/email_stats.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/atc/email_stats.py b/tools/atc/email_stats.py index 503f4073c8..7698c3210f 100755 --- a/tools/atc/email_stats.py +++ b/tools/atc/email_stats.py @@ -34,7 +34,7 @@ import yaml MAILTO_RE = re.compile('mailto:(.*)') USERNAME_RE = re.compile('username:(.*)') -EXTRA_ATC_RE = re.compile('[^:]*: ([^\(]*) \(([^@]*@[^\)]*)\) \[[^\[]*\]') +EXTRA_ATC_RE = re.compile('^[^#][^:]*: ([^\(]*) \(([^@]*@[^\)]*)\) \[[^\[]*\]') PROGRAMS_URL = ('https://git.openstack.org/cgit/openstack/governance/plain' '/reference/programs.yaml') EXTRA_ATCS_URL = ('https://git.openstack.org/cgit/openstack/governance/plain' @@ -200,7 +200,10 @@ def main(): writer = csv.writer(open('out/extra-atcs.csv', 'w')) for atc in get_extra_atcs(EXTRA_ATCS_URL): - writer.writerow([''] + list(EXTRA_ATC_RE.match(atc).groups())) + try: + writer.writerow([''] + list(EXTRA_ATC_RE.match(atc).groups())) + except AttributeError: + pass if __name__ == "__main__":