diff options
author | Jordan Cook <JWCook@users.noreply.github.com> | 2021-04-21 10:28:42 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-04-21 10:47:01 -0500 |
commit | cdf07cc8aa68b410020182b4127aa8394ce7b7d4 (patch) | |
tree | 70d918b4c77eab533d1b9e41b3fcc165fb4f93be | |
parent | 683eb8f6d45b259be60d5470e84c256283d037cc (diff) | |
download | requests-cache-cdf07cc8aa68b410020182b4127aa8394ce7b7d4.tar.gz |
Use shared connection to create initial SQLite table
-rw-r--r-- | requests_cache/backends/sqlite.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/requests_cache/backends/sqlite.py b/requests_cache/backends/sqlite.py index 8cc301b..df08cf8 100644 --- a/requests_cache/backends/sqlite.py +++ b/requests_cache/backends/sqlite.py @@ -66,7 +66,7 @@ class DbDict(BaseStorage): self._can_commit = True self._local_context = threading.local() - with self.connection() as con: + with sqlite3.connect(self.db_path, **self.connection_kwargs) as con: con.execute("create table if not exists `%s` (key PRIMARY KEY, value)" % self.table_name) @contextmanager |