Returning only an e-mail addr on lookup function

This commit is contained in:
Sergio Durigan Junior 2016-09-19 16:58:55 -04:00
parent 40fa073ed4
commit 0099617bf8

View file

@ -575,7 +575,7 @@ class LookupEmailTryBuild (object):
# List of [ dir, sorted_reverse ] # List of [ dir, sorted_reverse ]
tryjobdir = [ [ os.path.expanduser ("~/gdb/try_ssh_jobdir/new/"), False ], tryjobdir = [ [ os.path.expanduser ("~/gdb/try_ssh_jobdir/new/"), False ],
[ os.path.expanduser ("~/gdb/try_ssh_jobdir/cur/"), True ] ] [ os.path.expanduser ("~/gdb/try_ssh_jobdir/cur/"), True ] ]
name_re = re.compile (".*(%s <.*@.*>),.*" % name, flags = re.UNICODE) name_re = re.compile (".*(%s <(.*@.*)>),.*" % name, flags = re.UNICODE)
for directory, sort_order in tryjobdir: for directory, sort_order in tryjobdir:
for _, _, filenames in os.walk (directory): for _, _, filenames in os.walk (directory):
for f in sorted (filenames, reverse = sort_order): for f in sorted (filenames, reverse = sort_order):
@ -583,7 +583,7 @@ class LookupEmailTryBuild (object):
for line in reversed (myf.readlines ()): for line in reversed (myf.readlines ()):
m = re.match (name_re, line) m = re.match (name_re, line)
if m: if m:
return m.group (1) return m.group (2)
mn_try = MyMailNotifier(fromaddr = GDB_MAIL_FROM, mn_try = MyMailNotifier(fromaddr = GDB_MAIL_FROM,
sendToInterestedUsers = True, sendToInterestedUsers = True,