Read then write sqlite transactions must use BEGIN IMMEDIATE
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ class Greylist(object):
|
|||||||
|
|
||||||
def check(self,ip,sender,recipient,timeinc=0):
|
def check(self,ip,sender,recipient,timeinc=0):
|
||||||
"Return number of allowed messages for greylist triple."
|
"Return number of allowed messages for greylist triple."
|
||||||
cur = self.conn.cursor()
|
cur = self.conn.execute('begin immediate')
|
||||||
try:
|
try:
|
||||||
cur.execute('''select firstseen,lastseen,cnt,umis from greylist where
|
cur.execute('''select firstseen,lastseen,cnt,umis from greylist where
|
||||||
ip=? and sender=? and recipient=?''',(ip,sender,recipient))
|
ip=? and sender=? and recipient=?''',(ip,sender,recipient))
|
||||||
|
|||||||
Reference in New Issue
Block a user