VirtualMailManager/serviceset.py
changeset 594 cdbe200c0ecc
parent 568 14abdd04ddf5
child 638 0de0b9e75c9f
child 675 d24f094d1cb5
--- a/VirtualMailManager/serviceset.py	Thu Aug 23 21:27:33 2012 +0000
+++ b/VirtualMailManager/serviceset.py	Mon Aug 27 20:49:31 2012 +0000
@@ -109,7 +109,7 @@
                ' AND '.join('%s = %s' %
                (k, str(v).upper()) for k, v in self._services.iteritems()))
         if self._sieve_col == 'managesieve':
-            sql.replace('sieve', self._sieve_col)
+            sql = sql.replace('sieve', self._sieve_col)
         dbc = self._dbh.cursor()
         dbc.execute(sql)
         result = dbc.fetchone()
@@ -141,8 +141,6 @@
         sql = ('INSERT INTO service_set (ssid, smtp, pop3, imap, %s) ' %
                (self._sieve_col,) +
                'VALUES (%(ssid)s, %(smtp)s, %(pop3)s, %(imap)s, %(sieve)s)')
-        if self._sieve_col == 'managesieve':
-            sql.replace('sieve', self._sieve_col)
         self._set_ssid()
         values = {'ssid': self._ssid}
         values.update(self._services)