VirtualMailManager/alias.py
branchv0.6.x
changeset 370 1b1f8f0cc687
parent 366 d6573da35b5f
child 379 7518d927d443
equal deleted inserted replaced
369:4dfc5f3c1f2c 370:1b1f8f0cc687
   125             return destinations
   125             return destinations
   126         self._check_expansion(len(destinations))
   126         self._check_expansion(len(destinations))
   127         dbc = self._dbh.cursor()
   127         dbc = self._dbh.cursor()
   128         dbc.executemany("INSERT INTO alias VALUES (%d, '%s', %%s)" %
   128         dbc.executemany("INSERT INTO alias VALUES (%d, '%s', %%s)" %
   129                         (self._gid, self._addr.localpart),
   129                         (self._gid, self._addr.localpart),
   130                         (str(destination) for destination in destinations))
   130                         ((str(destination),) for destination in destinations))
   131         self._dbh.commit()
   131         self._dbh.commit()
   132         dbc.close()
   132         dbc.close()
   133         self._dests.extend(destinations)
   133         self._dests.extend(destinations)
   134         return destinations
   134         return destinations
   135 
   135