summaryrefslogtreecommitdiff
path: root/requests_cache/backends/sqlite.py
diff options
context:
space:
mode:
authorJordan Cook <JWCook@users.noreply.github.com>2021-04-21 10:55:53 -0500
committerGitHub <noreply@github.com>2021-04-21 10:55:53 -0500
commit38ddcf5425eadc6b174a8b053b2175c4dda00a1f (patch)
treed46101fbfa57b73c36d0a042383da7f60fba739b /requests_cache/backends/sqlite.py
parentcdf07cc8aa68b410020182b4127aa8394ce7b7d4 (diff)
parent15f9fb652b08e1e6a9cbb2515ebafe8f962afb4a (diff)
downloadrequests-cache-38ddcf5425eadc6b174a8b053b2175c4dda00a1f.tar.gz
Merge pull request #238 from JWCook/filesystem-backend
Add a filesystem backend
Diffstat (limited to 'requests_cache/backends/sqlite.py')
-rw-r--r--requests_cache/backends/sqlite.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/requests_cache/backends/sqlite.py b/requests_cache/backends/sqlite.py
index df08cf8..470d00c 100644
--- a/requests_cache/backends/sqlite.py
+++ b/requests_cache/backends/sqlite.py
@@ -136,7 +136,7 @@ class DbDict(BaseStorage):
def clear(self):
with self.connection(True) as con:
- con.execute("drop table `%s`" % self.table_name)
+ con.execute("drop table if exists `%s`" % self.table_name)
con.execute("create table `%s` (key PRIMARY KEY, value)" % self.table_name)
con.execute("vacuum")