MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / endTransaction

Method endTransaction

lib/utils/hashdb.py:195–221  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

193 threadData.inTransaction = True
194
195 def endTransaction(self):
196 threadData = getCurrentThreadData()
197 if threadData.inTransaction:
198 retries = 0
199 while retries < HASHDB_END_TRANSACTION_RETRIES:
200 try:
201 self.cursor.execute("END TRANSACTION")
202 threadData.inTransaction = False
203 except sqlite3.OperationalError:
204 pass
205 except sqlite3.ProgrammingError:
206 self.cursor = None
207 threadData.inTransaction = False
208 return
209 else:
210 return
211
212 retries += 1
213 time.sleep(1)
214
215 try:
216 self.cursor.execute("ROLLBACK TRANSACTION")
217 except sqlite3.OperationalError:
218 self.cursor.close()
219 self.cursor = None
220 finally:
221 threadData.inTransaction = False

Callers 2

flushMethod · 0.95
_finalizeFunction · 0.45

Calls 3

getCurrentThreadDataFunction · 0.90
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected