From eb4f1dddce50cf5fb607a919b4bc67983c21e78d Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 18 Sep 2026 20:59:16 +0000 Subject: [PATCH] lint --- copyparty/httpcli.py | 4 ++-- copyparty/up2k.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index bd887f537..fea5cd206 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -7079,17 +7079,16 @@ class HttpCli(object): e2d = "e2d" in vn.flags e2t = "e2t" in vn.flags + og_fn = "" add_og = "og" in vn.flags if add_og: if "th" in self.uparam or "raw" in self.uparam or "opds" in self.uparam: add_og = False elif vn.flags["og_ua"]: add_og = vn.flags["og_ua"].search(self.ua) - og_fn = "" if "v" in self.uparam: add_og = True - og_fn = "" if "b" in self.uparam and "norobots" not in vn.flags: self.out_headers["X-Robots-Tag"] = "noindex, nofollow" @@ -7610,6 +7609,7 @@ class HttpCli(object): return self.tx_file("oh_f", ap) # is no-cache if icur: + assert idx # type: ignore # !rm mte = vn.flags.get("mte") or {} tagset: set[str] = set() rd = vrem diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 6391cca49..85ca27c57 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -909,7 +909,7 @@ class Up2k(object): with self.mutex: if gid != self.gid: - return False + return if self.pp: continue @@ -1100,7 +1100,7 @@ class Up2k(object): cur.execute("vacuum") if self.stop: - return False + return for vol in all_vols.values(): if vol.flags["dbd"] == "acid": @@ -1130,7 +1130,7 @@ class Up2k(object): self.log("checkpoint failed: {}".format(ex), 3) if self.stop: - return False + return self.pp.end = True @@ -2182,8 +2182,8 @@ class Up2k(object): rd2, fn2 = hit if fn == fn2 and rd == rd2 and vol is v2: continue + apt = "" try: - apt = "" rd, fn = s3dec(rd, fn) rd2, fn2 = s3dec(rd2, fn2) fp1 = os.path.join(vol.realpath, rd, fn)