summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2013-08-14 13:18:20 -0600
committerJonathan Corbet <corbet@lwn.net>2013-08-14 13:18:20 -0600
commit597aff28b3e4786f9b5913072ad7c8c8e9bd3e1b (patch)
tree47913a75c024f872a276e5aab798ac1c7bd21e48
parent0441cd893e81991d1843b6a2d3ed928d402c1620 (diff)
Move LookupStoreHacker to database
-rw-r--r--database.py13
-rwxr-xr-xgitdm16
2 files changed, 17 insertions, 12 deletions
diff --git a/database.py b/database.py
index 321c5bf..fcf07af 100644
--- a/database.py
+++ b/database.py
@@ -103,6 +103,19 @@ def LookupID (id):
except KeyError:
return None
+def LookupStoreHacker(name, email, mapunknown = False):
+ email = RemapEmail(email)
+ h = LookupEmail(email)
+ if h: # already there
+ return h
+ elist = LookupEmployer(email, mapunknown)
+ h = LookupName(name)
+ if h: # new email
+ h.addemail(email, elist)
+ return h
+ return StoreHacker(name, elist, email)
+
+
def AllHackers ():
return HackersByID.values ()
# return [h for h in HackersByID.values ()] # if (h.added + h.removed) > 0]
diff --git a/gitdm b/gitdm
index 14dc88e..c2b20cd 100755
--- a/gitdm
+++ b/gitdm
@@ -153,19 +153,11 @@ def NoteFileAccess(paths):
AddAccess(path)
path, last = os.path.split(path)
-
-
+#
+# Local version still, for now
+#
def LookupStoreHacker(name, email):
- email = database.RemapEmail(email)
- h = database.LookupEmail(email)
- if h: # already there
- return h
- elist = database.LookupEmployer(email, MapUnknown)
- h = database.LookupName(name)
- if h: # new email
- h.addemail(email, elist)
- return h
- return database.StoreHacker(name, elist, email)
+ return database.LookupStoreHacker(name, email, MapUnknown)
#
# Date tracking.