VMM/account: Replaced property domain_directory by domain. v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Fri, 30 Jul 2010 09:37:44 +0000
branchv0.6.x
changeset 329 41789df75339
parent 328 85972d3ba936
child 330 3fe8d6cdbe3a
VMM/account: Replaced property domain_directory by domain.
VirtualMailManager/account.py
VirtualMailManager/handler.py
--- a/VirtualMailManager/account.py	Thu Jul 29 23:09:44 2010 +0000
+++ b/VirtualMailManager/account.py	Fri Jul 30 09:37:44 2010 +0000
@@ -154,10 +154,10 @@
         return self._addr
 
     @property
-    def domain_directory(self):
-        """The directory of the domain the Account belongs to."""
+    def domain(self):
+        """The Domain to which the Account belongs to."""
         if self._domain:
-            return self._domain.directory
+            return self._domain
         return None
 
     @property
--- a/VirtualMailManager/handler.py	Thu Jul 29 23:09:44 2010 +0000
+++ b/VirtualMailManager/handler.py	Fri Jul 30 09:37:44 2010 +0000
@@ -262,7 +262,7 @@
 
     def _make_home(self, account):
         """Create a home directory for the new Account *account*."""
-        domdir = account.domain_directory
+        domdir = account.domain.directory
         if not lisdir(domdir):
             raise VMMError(_(u"No such directory: %s") % domdir,
                            NO_SUCH_DIRECTORY)
@@ -279,7 +279,7 @@
 
         `domdir` : basestring
           The directory of the domain the user belongs to
-          (commonly AccountObj.domain_directory)
+          (commonly AccountObj.domain.directory)
         `uid` : int/long
           The user's UID (commonly AccountObj.uid)
         `gid` : int/long
@@ -542,7 +542,7 @@
                            acc.address, NO_SUCH_ACCOUNT)
         uid = acc.uid
         gid = acc.gid
-        dom_dir = acc.domain_directory
+        dom_dir = acc.domain.directory
         acc_dir = acc.home
         acc.delete(bool(force))
         if self._cfg.dget('account.delete_directory'):