James O'Beirne committed 7b2aacf Draft

Set `check_same_thread` to False for sqlite.

This is to prevent ProgrammingErrors in ddbmock related to callbacks
that invoke objects created by the main thread.

Comments (0)

Files changed (1)


 # I know, using global "variable" for this kind of state *is* bad. But it helps
 # keeping execution times to a sane value. In particular, this allows to use
 # in-memory version of sqlite
-conn = sqlite3.connect(config.STORAGE_SQLITE_FILE)
+conn = sqlite3.connect(config.STORAGE_SQLITE_FILE, check_same_thread=False)
 class Store(object):
     def __init__(self, name):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.