mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Patch for an Issue #1226đ
This commit is contained in:
parent
bb98894dc1
commit
a94dcf94e9
|
@ -77,10 +77,17 @@ class Database(object):
|
||||||
self.connection.commit()
|
self.connection.commit()
|
||||||
|
|
||||||
def execute(self, statement, arguments=None):
|
def execute(self, statement, arguments=None):
|
||||||
if arguments:
|
while True:
|
||||||
self.cursor.execute(statement, arguments)
|
try:
|
||||||
else:
|
if arguments:
|
||||||
self.cursor.execute(statement)
|
self.cursor.execute(statement, arguments)
|
||||||
|
else:
|
||||||
|
self.cursor.execute(statement)
|
||||||
|
except sqlite3.OperationalError, ex:
|
||||||
|
if not "locked" in ex.message:
|
||||||
|
raise
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
if statement.lstrip().upper().startswith("SELECT"):
|
if statement.lstrip().upper().startswith("SELECT"):
|
||||||
return self.cursor.fetchall()
|
return self.cursor.fetchall()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user