VirtualMailManager/Transport.py
branchv0.6.x
changeset 308 aa4a9fc31e1b
parent 235 9d3405ed08e5
child 316 31d8931dc535
equal deleted inserted replaced
307:217b419d6561 308:aa4a9fc31e1b
     2 # Copyright (c) 2008 - 2010, Pascal Volk
     2 # Copyright (c) 2008 - 2010, Pascal Volk
     3 # See COPYING for distribution information.
     3 # See COPYING for distribution information.
     4 
     4 
     5 """
     5 """
     6     VirtualMailManager.Transport
     6     VirtualMailManager.Transport
       
     7     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     7 
     8 
     8     Virtual Mail Manager's Transport class to manage the transport for
     9     Virtual Mail Manager's Transport class to manage the transport for
     9     domains and accounts.
    10     domains and accounts.
    10 """
    11 """
    11 
    12 
    70         result = dbc.fetchone()
    71         result = dbc.fetchone()
    71         dbc.close()
    72         dbc.close()
    72         if result:
    73         if result:
    73             self._transport = result[0]
    74             self._transport = result[0]
    74         else:
    75         else:
    75             raise TransportError(_('Unknown tid specified.'),
    76             raise TransportError(_(u'Unknown tid specified.'),
    76                                  UNKNOWN_TRANSPORT_ID)
    77                                  UNKNOWN_TRANSPORT_ID)
    77 
    78 
    78     def _loadByName(self):
    79     def _loadByName(self):
    79         dbc = self._dbh.cursor()
    80         dbc = self._dbh.cursor()
    80         dbc.execute('SELECT tid FROM transport WHERE transport = %s',
    81         dbc.execute('SELECT tid FROM transport WHERE transport = %s',