[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r12888: Add . handling to normalizeEmail (in bridgedb/trunk: . lib/bridgedb)
Author: nickm
Date: 2007-12-20 14:17:46 -0500 (Thu, 20 Dec 2007)
New Revision: 12888
Modified:
bridgedb/trunk/
bridgedb/trunk/lib/bridgedb/Dist.py
Log:
r17278@catbus: nickm | 2007-12-20 14:17:42 -0500
Add . handling to normalizeEmail
Property changes on: bridgedb/trunk
___________________________________________________________________
svk:merge ticket from /bridgedb/trunk [r17278] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: bridgedb/trunk/lib/bridgedb/Dist.py
===================================================================
--- bridgedb/trunk/lib/bridgedb/Dist.py 2007-12-20 06:47:59 UTC (rev 12887)
+++ bridgedb/trunk/lib/bridgedb/Dist.py 2007-12-20 19:17:46 UTC (rev 12888)
@@ -156,9 +156,16 @@
domain = domainmap.get(domain, None)
if domain is None:
raise UnsupportedDomain("Domain not supported", addr)
+
+ #XXXX Do these rules also hold for Yahoo?
+
+ # addr+foo@ is an alias for addr@
idx = localpart.find('+')
if idx >= 0:
localpart = localpart[:idx]
+ # j.doe@ is the same as jdoe@.
+ localpart = localpart.replace(".")
+
return "%s@%s"%(localpart, domain)
class EmailBasedDistributor(bridgedb.Bridges.BridgeHolder):