# HG changeset patch # User Pascal Volk # Date 1346100571 0 # Node ID cdbe200c0ecc155fc4b97367addbb6d730d8d39a # Parent 3dc1764c23d284638850eaae026c55e403d5274e VMM/serviceset: Fixed a conditional ProgrammingError. Affects only setups with Dovecot < v1.2.beta2. Actually the SQL query in method ServiceSet._load_by_services wasn't updated. Removed unnecessary code, which would have also produced a ProgrammingError, if it would have been correct. diff -r 3dc1764c23d2 -r cdbe200c0ecc VirtualMailManager/serviceset.py --- 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)