VMM/Handler: renamed some methods and added their missing docstrings: v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Sat, 17 Apr 2010 21:39:00 +0000
branchv0.6.x
changeset 255 d2ddd4a6528d
parent 254 8aecc83a0d32
child 256 ae80282301a3
VMM/Handler: renamed some methods and added their missing docstrings: - cfgDget() -> cfg_dget() - cfgPget() -> cfg_pget() - userByID() -> user_by_uid()
VirtualMailManager/Handler.py
--- a/VirtualMailManager/Handler.py	Fri Apr 16 03:58:07 2010 +0000
+++ b/VirtualMailManager/Handler.py	Sat Apr 17 21:39:00 2010 +0000
@@ -397,10 +397,14 @@
         del self.__warnings[:]
         return ret_val
 
-    def cfgDget(self, option):
+    def cfg_dget(self, option):
+        """Get the configured value of the *option* (section.option).
+        When the option was not configured its default value will be
+        returned."""
         return self._Cfg.dget(option)
 
-    def cfgPget(self, option):
+    def cfg_pget(self, option):
+        """Get the configured value of the *option* (section.option)."""
         return self._Cfg.pget(option)
 
     def domainAdd(self, domainname, transport=None):
@@ -632,10 +636,12 @@
             return (info, acc.getAliases())
         return info
 
-    def userByID(self, uid):
-        from VirtualMailManager.Account import getAccountByID
+    def user_by_uid(self, uid):
+        """Search for an Account by its *uid*.
+        Returns a dict (address, uid and gid) if a user could be found."""
+        from VirtualMailManager.Account import get_account_by_uid
         self.__dbConnect()
-        return getAccountByID(uid, self._dbh)
+        return get_account_by_uid(uid, self._dbh)
 
     def userPassword(self, emailaddress, password):
         if password is None or (isinstance(password, basestring) and