Skip to content
Snippets Groups Projects
Commit 078d9f20 authored by Stuart Gathman's avatar Stuart Gathman
Browse files

Read then write sqlite transactions must use BEGIN IMMEDIATE

parent ff06b5f1
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ class Greylist(object): ...@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment