VMM/serviceset: Added @property ServiceSet.services -> dict. v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Tue, 01 Nov 2011 23:37:06 +0000
branchv0.6.x
changeset 443 e2b9e3de2b51
parent 442 abcd73f5e980
child 444 95275b61ff8a
VMM/serviceset: Added @property ServiceSet.services -> dict.
VirtualMailManager/serviceset.py
--- a/VirtualMailManager/serviceset.py	Tue Nov 01 13:07:45 2011 +0000
+++ b/VirtualMailManager/serviceset.py	Tue Nov 01 23:37:06 2011 +0000
@@ -29,6 +29,8 @@
       Boolean flag for service imap
     `sieve` : bool
       Boolean flag for service sieve
+    `services` : dict
+      The four services above with boolean values
     """
     __slots__ = ('_ssid', '_services', '_sieve_col', '_dbh')
     _kwargs = (('ssid',) + SERVICES)
@@ -152,4 +154,10 @@
         self._ssid = dbc.fetchone()[0]
         dbc.close()
 
+    @property
+    def services(self):
+        """A dictionary: Keys: `smtp`, `pop3`, `imap` and `sieve` with
+        boolean values."""
+        return self._services.copy()
+
 del cfg_dget