VirtualMailManager/handler.py
branchv0.6.x
changeset 372 ef99be5b7ec0
parent 371 3b2fd0b4e51b
child 373 1016a17684c1
equal deleted inserted replaced
371:3b2fd0b4e51b 372:ef99be5b7ec0
   244 
   244 
   245     def _get_account(self, address):
   245     def _get_account(self, address):
   246         """Return an Account instances for the given address (str)."""
   246         """Return an Account instances for the given address (str)."""
   247         address = EmailAddress(address)
   247         address = EmailAddress(address)
   248         self._db_connect()
   248         self._db_connect()
       
   249         self._is_other_address(address, TYPE_ACCOUNT)
   249         return Account(self._dbh, address)
   250         return Account(self._dbh, address)
   250 
   251 
   251     def _get_alias(self, address):
   252     def _get_alias(self, address):
   252         """Return an Alias instances for the given address (str)."""
   253         """Return an Alias instances for the given address (str)."""
   253         address = EmailAddress(address)
   254         address = EmailAddress(address)
   254         self._db_connect()
   255         self._db_connect()
       
   256         self._is_other_address(address, TYPE_ALIAS)
   255         return Alias(self._dbh, address)
   257         return Alias(self._dbh, address)
   256 
   258 
   257     def _get_relocated(self, address):
   259     def _get_relocated(self, address):
   258         """Return a Relocated instances for the given address (str)."""
   260         """Return a Relocated instances for the given address (str)."""
   259         address = EmailAddress(address)
   261         address = EmailAddress(address)
   260         self._db_connect()
   262         self._db_connect()
       
   263         self._is_other_address(address, TYPE_RELOCATED)
   261         return Relocated(self._dbh, address)
   264         return Relocated(self._dbh, address)
   262 
   265 
   263     def _get_domain(self, domainname):
   266     def _get_domain(self, domainname):
   264         """Return a Domain instances for the given domain name (str)."""
   267         """Return a Domain instances for the given domain name (str)."""
   265         self._db_connect()
   268         self._db_connect()