10000 check emails of ticket owners · thouis/numpy-trac-migration@6e0683b · GitHub
[go: up one dir, main page]

Skip to content

Commit 6e0683b

Browse files
committed
check emails of ticket owners
1 parent 0ef99fb commit 6e0683b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

check_emails.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Check that ticket owners are in EMAIL_TO_GITHUB.txt map
2+
import sqlite3
3+
4+
email_map = dict([s.strip().split(" ") for s in open("EMAIL_TO_GITHUB.txt")])
5+
6+
def check_ticket_owners(dbfile):
7+
conn = sqlite3.connect(dbfile)
8+
c = conn.cursor()
9+
for (owner,) in c.execute("SELECT owner FROM ticket").fetchall():
10+
if owner in ["somebody", "anonymous", "spammer"]:
11+
print owner, "None"
12+
continue
13+
email = c.execute('SELECT value FROM session_attribute WHERE sid=? AND name="email"', (owner,)).fetchone()
14+
if email is None:
15+
email = owner
16+
else:
17+
email = email[0]
18+
if email in email_map:
19+
print email, email_map[email]
20+
else:
21+
print "MISSING", email
22+
23+
if __name__ == '__main__':
24+
check_ticket_owners("numpy-trac.db")
25+

0 commit comments

Comments
 (0)
0