VMM/serviceset: Use SERVICES inside of ServiceSet - avoid slicing. v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Tue, 01 Nov 2011 01:01:33 +0000
branchv0.6.x
changeset 440 1a08fe35b496
parent 439 39036f5e6387
child 441 1af5fe0683ce
VMM/serviceset: Use SERVICES inside of ServiceSet - avoid slicing.
VirtualMailManager/serviceset.py
--- a/VirtualMailManager/serviceset.py	Mon Oct 31 22:14:22 2011 +0000
+++ b/VirtualMailManager/serviceset.py	Tue Nov 01 01:01:33 2011 +0000
@@ -57,7 +57,7 @@
         """
         self._dbh = dbh
         self._ssid = 0
-        self._services = dict.fromkeys(self.__class__._kwargs[1:], True)
+        self._services = dict.fromkeys(SERVICES, True)
         if cfg_dget('misc.dovecot_version') < 0x10200b02:
             self._sieve_col = 'managesieve'
         else:
@@ -127,7 +127,7 @@
         if not result:
             raise ValueError('Unknown service_set id specified: %r' % ssid)
         self._ssid = result[0]
-        self._services.update(zip(self.__class__._kwargs[1:], result[1:]))
+        self._services.update(zip(SERVICES, result[1:]))
 
     def _save(self):
         """Store a new service_set in the database."""