# HG changeset patch # User Pascal Volk # Date 1271362878 0 # Node ID 73cd082cd7243b4d28877322f12b04a2988f8699 # Parent bb7d9906c52953a2442b195117d5b9ed8fba9b45 VMM/{Account,Alias,Relocated}: added a address property to the classes Account, Alias and Relocated. diff -r bb7d9906c529 -r 73cd082cd724 VirtualMailManager/Account.py --- a/VirtualMailManager/Account.py Thu Apr 15 19:46:53 2010 +0000 +++ b/VirtualMailManager/Account.py Thu Apr 15 20:21:18 2010 +0000 @@ -134,6 +134,11 @@ NO_SUCH_ACCOUNT) @property + def address(self): + """The Account's EmailAddress instance.""" + return self._addr + + @property def domain_directory(self): """The directory of the domain the Account belongs to.""" return self._domain.directory diff -r bb7d9906c529 -r 73cd082cd724 VirtualMailManager/Alias.py --- a/VirtualMailManager/Alias.py Thu Apr 15 19:46:53 2010 +0000 +++ b/VirtualMailManager/Alias.py Thu Apr 15 20:21:18 2010 +0000 @@ -91,6 +91,11 @@ """Returns the number of destinations of the alias.""" return len(self._dests) + @property + def address(self): + """The Alias' EmailAddress instance.""" + return self._addr + def add_destinations(self, destinations, expansion_limit, warnings=None): """Adds the `EmailAddress`es from *destinations* list to the destinations of the alias. diff -r bb7d9906c529 -r 73cd082cd724 VirtualMailManager/Relocated.py --- a/VirtualMailManager/Relocated.py Thu Apr 15 19:46:53 2010 +0000 +++ b/VirtualMailManager/Relocated.py Thu Apr 15 20:21:18 2010 +0000 @@ -59,6 +59,11 @@ if destination: self._dest = EmailAddress(destination[0]) + @property + def address(self): + """The Relocated's EmailAddress instance.""" + return self._addr + def set_destination(self, destination): """Sets/updates the new address of the relocated user.""" update = False