Returning just the name on the email lookup function
This commit is contained in:
parent
0099617bf8
commit
5cb3e0ee48
1 changed files with 1 additions and 12 deletions
13
master.cfg
13
master.cfg
|
@ -572,18 +572,7 @@ class LookupEmailTryBuild (object):
|
|||
implements (IEmailLookup)
|
||||
|
||||
def getAddress (self, name):
|
||||
# List of [ dir, sorted_reverse ]
|
||||
tryjobdir = [ [ os.path.expanduser ("~/gdb/try_ssh_jobdir/new/"), False ],
|
||||
[ os.path.expanduser ("~/gdb/try_ssh_jobdir/cur/"), True ] ]
|
||||
name_re = re.compile (".*(%s <(.*@.*)>),.*" % name, flags = re.UNICODE)
|
||||
for directory, sort_order in tryjobdir:
|
||||
for _, _, filenames in os.walk (directory):
|
||||
for f in sorted (filenames, reverse = sort_order):
|
||||
with open (os.path.join (directory, f), 'r') as myf:
|
||||
for line in reversed (myf.readlines ()):
|
||||
m = re.match (name_re, line)
|
||||
if m:
|
||||
return m.group (2)
|
||||
return name
|
||||
|
||||
mn_try = MyMailNotifier(fromaddr = GDB_MAIL_FROM,
|
||||
sendToInterestedUsers = True,
|
||||
|
|
Loading…
Reference in a new issue