From 1f69dbdb82f20980efb3d834730aea9369f7a554 Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Wed, 8 May 2024 12:34:07 -0500 Subject: [PATCH] fix clean install bug --- get_specs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/get_specs.py b/get_specs.py index a775249..834a6c7 100755 --- a/get_specs.py +++ b/get_specs.py @@ -313,7 +313,8 @@ def get_multi(partnums, delay, dir, webport, cache=True, bar=None): if _download_image(search_result["image"], output_dir): fprint("Downloaded hi-res part image for " + partnum) returnval = [partnum, dstype, True, False] - os.remove(output_dir + "/parsed") + if os.path.exists(output_dir + "/parsed"): + os.remove(output_dir + "/parsed") touch(output_dir + "/found_part_hires") else: fprint("Using cached hi-res part image for " + partnum)