(self)
| 177 | self.endTransaction() |
| 178 | |
| 179 | def beginTransaction(self): |
| 180 | threadData = getCurrentThreadData() |
| 181 | if not threadData.inTransaction: |
| 182 | try: |
| 183 | self.cursor.execute("BEGIN TRANSACTION") |
| 184 | except: |
| 185 | try: |
| 186 | # Reference: http://stackoverflow.com/a/25245731 |
| 187 | self.cursor.close() |
| 188 | except sqlite3.ProgrammingError: |
| 189 | pass |
| 190 | threadData.hashDBCursor = None |
| 191 | self.cursor.execute("BEGIN TRANSACTION") |
| 192 | finally: |
| 193 | threadData.inTransaction = True |
| 194 | |
| 195 | def endTransaction(self): |
| 196 | threadData = getCurrentThreadData() |
no test coverage detected