git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
82fc208
)
added email_to_hrn()
author
Tony Mack
<tmack@cs.princeton.edu>
Mon, 14 Sep 2009 23:11:37 +0000
(23:11 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Mon, 14 Sep 2009 23:11:37 +0000
(23:11 +0000)
sfa/util/misc.py
patch
|
blob
|
history
diff --git
a/sfa/util/misc.py
b/sfa/util/misc.py
index
b674cd5
..
e46d8de
100644
(file)
--- a/
sfa/util/misc.py
+++ b/
sfa/util/misc.py
@@
-40,3
+40,10
@@
def slicename_to_hrn(auth_hrn, slicename):
return slice_hrn
return slice_hrn
+def email_to_hrn(auth_hrn, email):
+ parts = email.split("@")
+ username = parts[0]
+ username = username.replace(".", "_")
+ person_hrn = ".".join([auth_hrn, username])
+
+ return person_hrn