# HG changeset patch # User Pascal Volk # Date 1251200196 0 # Node ID 6ca3d22e5dd03f833a3abf3e70d4ad48a398e129 # Parent 2d5c4745efecebf63982c2fbdf8b8d2236ad63e1 Fixed a Python2.4.4 SyntaxError diff -r 2d5c4745efec -r 6ca3d22e5dd0 VirtualMailManager/Account.py --- a/VirtualMailManager/Account.py Tue Aug 25 11:08:00 2009 +0000 +++ b/VirtualMailManager/Account.py Tue Aug 25 11:36:36 2009 +0000 @@ -82,7 +82,10 @@ if self._uid < 1: raise AccE(_(u"The account ā€œ%sā€ doesn't exists.") % self._addr, ERR.NO_SUCH_ACCOUNT) - sieve_col = 'sieve' if dcvers > 11 else 'managesieve' + if dcvers > 11: + sieve_col = 'sieve' + else: + sieve_col = 'managesieve' if service in ('smtp', 'pop3', 'imap'): sql = 'UPDATE users SET %s = %s WHERE uid = %d' % (service, state, self._uid) @@ -131,7 +134,10 @@ def save(self, maillocation, dcvers, smtp, pop3, imap, sieve): if self._uid < 1: - sieve_col = 'sieve' if dcvers > 11 else 'managesieve' + if dcvers > 11: + sieve_col = 'sieve' + else: + sieve_col = 'managesieve' self._prepare(maillocation) sql = "INSERT INTO users (local_part, passwd, uid, gid, mid, tid,\ smtp, pop3, imap, %s) VALUES ('%s', '%s', %d, %d, %d, %d, %s, %s, %s, %s)" % ( @@ -167,7 +173,10 @@ dbc.close() def getInfo(self, dcvers): - sieve_col = 'sieve' if dcvers > 11 else 'managesieve' + if dcvers > 11: + sieve_col = 'sieve' + else: + sieve_col = 'managesieve' sql = 'SELECT name, uid, gid, mid, tid, smtp, pop3, imap, %s\ FROM users WHERE uid = %d' % (sieve_col, self._uid) dbc = self._dbh.cursor()