VirtualMailManager/Relocated.py
author Pascal Volk <neverseen@users.sourceforge.net>
Wed, 10 Feb 2010 07:38:19 +0000
branchv0.6.x
changeset 197 d2712e8c724e
parent 185 6e1ef32fbd82
child 198 02d467e4fbab
permissions -rw-r--r--
VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     1
# -*- coding: UTF-8 -*-
162
0ac9ef587769 Updated copyright notices to include the year 2010.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 155
diff changeset
     2
# Copyright (c) 2008 - 2010, Pascal Volk
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     3
# See COPYING for distribution information.
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     4
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
     5
"""
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
     6
    VirtualMailManager.Relocated
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     7
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
     8
    Virtual Mail Manager's Relocated class to handle relocated users.
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
     9
"""
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    10
185
6e1ef32fbd82 VMM/*: Moved some methods from classes to modules __init__.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 162
diff changeset
    11
from VirtualMailManager.Domain import Domain
6e1ef32fbd82 VMM/*: Moved some methods from classes to modules __init__.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 162
diff changeset
    12
from VirtualMailManager.EmailAddress import EmailAddress
6e1ef32fbd82 VMM/*: Moved some methods from classes to modules __init__.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 162
diff changeset
    13
from VirtualMailManager.Exceptions import VMMRelocatedException as VMMRE
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    14
from VirtualMailManager.constants.ERROR import NO_SUCH_DOMAIN, \
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    15
     NO_SUCH_RELOCATED, RELOCATED_ADDR_DEST_IDENTICAL, RELOCATED_EXISTS
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    16
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    17
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    18
_ = lambda msg: msg
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    19
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    20
122
30abf0abf8f8 Converted to new-style class, added __slots__.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 102
diff changeset
    21
class Relocated(object):
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    22
    """Class to handle e-mail addresses of relocated users."""
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    23
    __slots__ = ('_addr', '_dest', '_gid', '_dbh')
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    24
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    25
    def __init__(self, dbh, address):
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    26
        """Creates a new *Relocated* instance. The ``address`` is the
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    27
        old e-mail address of the user.
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    28
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    29
        Use `setDestination()` to set/update the new address, where the
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    30
        user has moved to."""
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    31
        if isinstance(address, EmailAddress):
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    32
            self._addr = address
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    33
        else:
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    34
            raise TypeError("Argument 'address' is not an EmailAddress")
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    35
        self._dbh = dbh
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    36
        self._gid = 0
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    37
        self._dest = None
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    38
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    39
        self.__set_gid()
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    40
        self.__load()
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    41
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    42
    def __set_gid(self):
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    43
        """Sets the `_gid` attribute, based on the `_addr.domainname`."""
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    44
        dom = Domain(self._dbh, self._addr.domainname)
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    45
        self._gid = dom.getID()
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    46
        if self._gid == 0:
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    47
            raise VMMRE(_(u"The domain “%s” doesn't exist.") %
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    48
                        self._addr.domainname, NO_SUCH_DOMAIN)
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    49
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    50
    def __load(self):
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    51
        """Loads the destination address from the database into the
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    52
        `_dest` attribute."""
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    53
        dbc = self._dbh.cursor()
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    54
        dbc.execute(
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    55
            'SELECT destination FROM relocated WHERE gid=%s AND address=%s',
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    56
                    self._gid, self._addr.localpart)
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    57
        destination = dbc.fetchone()
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    58
        dbc.close()
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    59
        if destination:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    60
            self._dest = EmailAddress(destination[0])
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    61
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    62
    def setDestination(self, destination):
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    63
        """Sets/updates the new address of the relocated user."""
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    64
        update = False
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    65
        if isinstance(destination, EmailAddress):
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    66
            if self._addr == destination:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    67
                raise VMMRE(_(u'Address and destination are identical.'),
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    68
                            RELOCATED_ADDR_DEST_IDENTICAL)
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    69
            if self._dest:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    70
                if self._dest == destination:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    71
                    raise VMMRE(
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    72
                            _(u'The relocated user “%s” already exists.') %
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    73
                                self._addr, RELOCATED_EXISTS)
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    74
                else:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    75
                    self._dest = destination
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    76
                    update = True
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    77
            else:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    78
                self._dest = destination
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    79
        else:
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    80
            raise TypeError("Argument 'destination' is not an EmailAddress")
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    81
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    82
        dbc = self._dbh.cursor()
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    83
        if not update:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    84
            dbc.execute('INSERT INTO relocated VALUES (%s, %s, %s)',
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    85
                        self._gid, self._addr.localpart, str(self._dest))
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    86
        else:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    87
            dbc.execute('UPDATE relocated SET destination=%s \
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    88
WHERE gid=%s AND address=%s',
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    89
                        str(self._dest), self._gid, self._addr.localpart)
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    90
        self._dbh.commit()
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    91
        dbc.close()
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    92
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    93
    def getInfo(self):
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    94
        """Returns the address to which mails should be sent."""
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    95
        if self._dest:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    96
            return self._dest
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    97
        else:
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    98
            raise VMMRE(_(u"The relocated user “%s” doesn't exist.") %
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
    99
                        self._addr, NO_SUCH_RELOCATED)
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   100
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   101
    def delete(self):
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   102
        """Deletes the relocated entry from the database."""
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   103
        if not self._dest:
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   104
            raise VMMRE(_(u"The relocated user “%s” doesn't exist.") %
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   105
                        self._addr, NO_SUCH_RELOCATED)
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   106
        dbc = self._dbh.cursor()
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   107
        dbc.execute("DELETE FROM relocated WHERE gid = %s AND address = %s",
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   108
                    self._gid, self._addr.localpart)
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   109
        if dbc.rowcount > 0:
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   110
            self._dbh.commit()
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   111
        dbc.close()
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   112
        self._dest = None
76
14c0a092d7d2 * 'VirtualMailManager/EmailAddress.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   113
197
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   114
d2712e8c724e VMM/{Relocated,Handler}: reworked Relocated class, adjusted Handler.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 185
diff changeset
   115
del _