equal
deleted
inserted
replaced
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', |