VirtualMailManager/EmailAddress.py
branchv0.6.x
changeset 215 33f727efa7c4
parent 213 1a9fee6b93bc
child 216 0c8c053b451c
equal deleted inserted replaced
214:84e6e898e6c5 215:33f727efa7c4
    56     def __str__(self):
    56     def __str__(self):
    57         return '%s@%s' % (self._localpart, self._domainname)
    57         return '%s@%s' % (self._localpart, self._domainname)
    58 
    58 
    59     def _chk_address(self, address):
    59     def _chk_address(self, address):
    60         """Checks if the string ``address`` could be used for an e-mail
    60         """Checks if the string ``address`` could be used for an e-mail
    61         address. If so, it will assign the corresponding values to the
    61         address.  If so, it will assign the corresponding values to the
    62         attributes `_localpart` and `_domainname`."""
    62         attributes `_localpart` and `_domainname`."""
    63         parts = address.split('@')
    63         parts = address.split('@')
    64         p_len = len(parts)
    64         p_len = len(parts)
    65         if p_len < 2:
    65         if p_len < 2:
    66             raise VMMEAE(_(u"Missing the '@' sign in address %r") % address,
    66             raise VMMEAE(_(u"Missing the '@' sign in address %r") % address,