From 6dd39811d4d61fe5efcc991c25a17db0a25dd095 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 21 Jun 2021 20:22:54 +0200 Subject: [PATCH] disable u2idx if sqlite3 is unavailable --- copyparty/u2idx.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/copyparty/u2idx.py b/copyparty/u2idx.py index 474d21a5..2a495037 100644 --- a/copyparty/u2idx.py +++ b/copyparty/u2idx.py @@ -26,7 +26,7 @@ class U2idx(object): self.timeout = self.args.srch_time if not HAVE_SQLITE3: - self.log("could not load sqlite3; searchign wqill be disabled") + self.log("your python does not have sqlite3; searching will be disabled") return self.cur = {} @@ -57,6 +57,9 @@ class U2idx(object): raise Pebkac(500, min_ex()) def get_cur(self, ptop): + if not HAVE_SQLITE3: + return None + cur = self.cur.get(ptop) if cur: return cur