VirtualMailManager/serviceset.py
branchv0.6.x
changeset 439 39036f5e6387
parent 438 e35efe931af3
child 440 1a08fe35b496
equal deleted inserted replaced
438:e35efe931af3 439:39036f5e6387
     6     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     6     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     7 
     7 
     8     Virtual Mail Manager's ServiceSet class for simplified database access
     8     Virtual Mail Manager's ServiceSet class for simplified database access
     9     to the service_set table.
     9     to the service_set table.
    10 """
    10 """
       
    11 
       
    12 SERVICES = ('smtp', 'pop3', 'imap', 'sieve')
    11 
    13 
    12 cfg_dget = lambda option: None
    14 cfg_dget = lambda option: None
    13 
    15 
    14 
    16 
    15 class ServiceSet(object):
    17 class ServiceSet(object):
    27       Boolean flag for service imap
    29       Boolean flag for service imap
    28     `sieve` : bool
    30     `sieve` : bool
    29       Boolean flag for service sieve
    31       Boolean flag for service sieve
    30     """
    32     """
    31     __slots__ = ('_ssid', '_services', '_sieve_col', '_dbh')
    33     __slots__ = ('_ssid', '_services', '_sieve_col', '_dbh')
    32     _kwargs = ('ssid', 'smtp', 'pop3', 'imap', 'sieve')
    34     _kwargs = (('ssid',) + SERVICES)
    33 
    35 
    34     def __init__(self, dbh, **kwargs):
    36     def __init__(self, dbh, **kwargs):
    35         """Creates a new ServiceSet instance.
    37         """Creates a new ServiceSet instance.
    36 
    38 
    37         Either the 'ssid' keyword argument or one or more of the service
    39         Either the 'ssid' keyword argument or one or more of the service