equal
deleted
inserted
replaced
66 address. If so, it will assign the corresponding values to the |
66 address. If so, it will assign the corresponding values to the |
67 attributes `_localpart` and `_domainname`.""" |
67 attributes `_localpart` and `_domainname`.""" |
68 parts = address.split('@') |
68 parts = address.split('@') |
69 p_len = len(parts) |
69 p_len = len(parts) |
70 if p_len < 2: |
70 if p_len < 2: |
71 raise EAErr(_(u"Missing the '@' sign in address %r") % address, |
71 raise EAErr(_(u"Missing the '@' sign in address '%s'") % address, |
72 INVALID_ADDRESS) |
72 INVALID_ADDRESS) |
73 elif p_len > 2: |
73 elif p_len > 2: |
74 raise EAErr(_(u"Too many '@' signs in address %r") % address, |
74 raise EAErr(_(u"Too many '@' signs in address '%s'") % address, |
75 INVALID_ADDRESS) |
75 INVALID_ADDRESS) |
76 if not parts[0]: |
76 if not parts[0]: |
77 raise EAErr(_(u'Missing local-part in address %r') % address, |
77 raise EAErr(_(u"Missing local-part in address '%s'") % address, |
78 LOCALPART_INVALID) |
78 LOCALPART_INVALID) |
79 if not parts[1]: |
79 if not parts[1]: |
80 raise EAErr(_(u'Missing domain name in address %r') % address, |
80 raise EAErr(_(u"Missing domain name in address '%s'") % address, |
81 DOMAIN_NO_NAME) |
81 DOMAIN_NO_NAME) |
82 self._localpart = check_localpart(parts[0]) |
82 self._localpart = check_localpart(parts[0]) |
83 self._domainname = check_domainname(parts[1]) |
83 self._domainname = check_domainname(parts[1]) |
84 |
84 |
85 |
85 |