From aa2a8fa22319982925399d2528913a522341ad56 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 11 Jan 2025 12:16:45 +0000 Subject: [PATCH] up2k-snap: remove deprecated properties v1.15.7 is the oldest version which still has any chance of reading the up2k.snap --- copyparty/up2k.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/copyparty/up2k.py b/copyparty/up2k.py index ca1c77b9..044f583c 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -1164,11 +1164,18 @@ class Up2k(object): self.log("ign deleted file in snap: %r" % (fp,)) if not n4g: rm.append(k) - continue for x in rm: del reg2[x] + # optimize pre-1.15.4 entries + if next((x for x in reg.values() if "done" in x and "poke" in x), None): + zsl = "host tnam busy sprs poke t0c".split() + for job in reg.values(): + if "done" in job: + for k in zsl: + job.pop(k, None) + if drp is None: drp = [k for k, v in reg.items() if not v["need"]] else: @@ -3011,7 +3018,7 @@ class Up2k(object): if wark in reg: del reg[wark] job["hash"] = job["need"] = [] - job["done"] = True + job["done"] = 1 job["busy"] = {} if lost: