VirtualMailManager/transport.py
branchv0.6.x
changeset 379 7518d927d443
parent 366 d6573da35b5f
child 449 6826acb9b0a7
equal deleted inserted replaced
378:af56cee51e67 379:7518d927d443
    94     def _save(self):
    94     def _save(self):
    95         """Save the new transport in the database."""
    95         """Save the new transport in the database."""
    96         dbc = self._dbh.cursor()
    96         dbc = self._dbh.cursor()
    97         dbc.execute("SELECT nextval('transport_id')")
    97         dbc.execute("SELECT nextval('transport_id')")
    98         self._tid = dbc.fetchone()[0]
    98         self._tid = dbc.fetchone()[0]
    99         dbc.execute('INSERT INTO transport VALUES (%s, %s)', (self._tid,
    99         dbc.execute('INSERT INTO transport (tid, transport) VALUES (%s, %s)',
   100                     self._transport))
   100                     (self._tid, self._transport))
   101         self._dbh.commit()
   101         self._dbh.commit()
   102         dbc.close()
   102         dbc.close()
   103 
   103 
   104 del _
   104 del _