Make ATC lists sort E-mails with preferred first
* tools/atc/email-stats.py: Adjust the order in which Gerrit E-mail addresses are returned so that the one listed as the preferred address is sorted to the beginning of the set. Change-Id: I95b5817ada58f4059df4f5c0b406183f1c1e5b74
This commit is contained in:
parent
876ba7a23b
commit
69e247d873
@ -49,6 +49,15 @@ def get_account(accounts, num):
|
|||||||
def main():
|
def main():
|
||||||
accounts = {}
|
accounts = {}
|
||||||
|
|
||||||
|
for row in csv.reader(open('accounts.csv')):
|
||||||
|
num = int(row[-1])
|
||||||
|
name = row[1]
|
||||||
|
email = row[2]
|
||||||
|
a = get_account(accounts, num)
|
||||||
|
a.full_name = name
|
||||||
|
if email and email != '\\N':
|
||||||
|
a.emails.append(email)
|
||||||
|
|
||||||
for row in csv.reader(open('emails.csv')):
|
for row in csv.reader(open('emails.csv')):
|
||||||
num, email, pw, external = row
|
num, email, pw, external = row
|
||||||
num = int(num)
|
num = int(num)
|
||||||
@ -67,12 +76,6 @@ def main():
|
|||||||
raise Exception("Already a username")
|
raise Exception("Already a username")
|
||||||
a.username = m.group(1)
|
a.username = m.group(1)
|
||||||
|
|
||||||
for row in csv.reader(open('accounts.csv')):
|
|
||||||
num = int(row[-1])
|
|
||||||
name = row[1]
|
|
||||||
a = get_account(accounts, num)
|
|
||||||
a.full_name = name
|
|
||||||
|
|
||||||
username_accounts = {}
|
username_accounts = {}
|
||||||
for a in accounts.values():
|
for a in accounts.values():
|
||||||
username_accounts[a.username] = a
|
username_accounts[a.username] = a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user