VMM/handler: Handler._get_{account,alias,relocated}() check
if the address is already in use.
--- a/VirtualMailManager/handler.py Mon Jan 17 19:08:18 2011 +0000
+++ b/VirtualMailManager/handler.py Mon Jan 17 19:44:36 2011 +0000
@@ -246,18 +246,21 @@
"""Return an Account instances for the given address (str)."""
address = EmailAddress(address)
self._db_connect()
+ self._is_other_address(address, TYPE_ACCOUNT)
return Account(self._dbh, address)
def _get_alias(self, address):
"""Return an Alias instances for the given address (str)."""
address = EmailAddress(address)
self._db_connect()
+ self._is_other_address(address, TYPE_ALIAS)
return Alias(self._dbh, address)
def _get_relocated(self, address):
"""Return a Relocated instances for the given address (str)."""
address = EmailAddress(address)
self._db_connect()
+ self._is_other_address(address, TYPE_RELOCATED)
return Relocated(self._dbh, address)
def _get_domain(self, domainname):