Clean up fullname detection for special domains.
(imported from commit 92450b37b8749d52a5322306e9475e8189ccfd89)
This commit is contained in:
		
							parent
							
								
									b183ced788
								
							
						
					
					
						commit
						f53420e347
					
				
					 1 changed files with 11 additions and 12 deletions
				
			
		|  | @ -94,18 +94,17 @@ def fetch_fullname(username): | ||||||
|         print >>sys.stderr, 'Error getting fullname for', username |         print >>sys.stderr, 'Error getting fullname for', username | ||||||
|         traceback.print_exc() |         traceback.print_exc() | ||||||
| 
 | 
 | ||||||
|     if username.upper().endswith("@CS.CMU.EDU"): |     domains = [ | ||||||
|         return username.split("@")[0] + " (CMU)" |         ("@CS.CMU.EDU", " (CMU)"), | ||||||
|     if username.upper().endswith("@ANDREW.CMU.EDU"): |         ("@ANDREW.CMU.EDU", " (CMU)"), | ||||||
|         return username.split("@")[0] + " (CMU)" |         ("@IASTATE.EDU", " (IASTATE)"), | ||||||
|     if username.upper().endswith("@IASTATE.EDU"): |         ("@1TS.ORG", " (1TS)"), | ||||||
|         return username.split("@")[0] + " (IASTATE)" |         ("@DEMENTIA.ORG", " (DEMENTIA)"), | ||||||
|     if username.upper().endswith("@1TS.ORG"): |         ("@MIT.EDU", ""), | ||||||
|         return username.split("@")[0] + " (1TS)" |         ] | ||||||
|     if username.upper().endswith("@DEMENTIA.ORG"): |     for (domain, tag) in domains: | ||||||
|         return username.split("@")[0] + " (DEMENTIA)" |         if username.upper().endswith(domain): | ||||||
|     if username.upper().endswith("MIT.EDU"): |             return username.split("@")[0] + tag | ||||||
|         return username.split("@")[0] |  | ||||||
|     return username |     return username | ||||||
| 
 | 
 | ||||||
| fullnames = {} | fullnames = {} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Abbott
						Tim Abbott