From: Boyuan Yang Date: Mon, 11 Nov 2024 11:15:26 -0500 Subject: build.py: Do not fail when cleaned file do not exist Bug-Debian: https://bugs.debian.org/1087300 --- build.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index 80950c5..58bef4a 100644 --- a/build.py +++ b/build.py @@ -36,9 +36,18 @@ for font in Path("master_ttf").glob("*.ttf"): GASP_set(modifiedFont) modifiedFont.save("fonts/ttf/"+str(font).split("/")[1]) -shutil.rmtree("instance_ufo") -shutil.rmtree("master_ufo") -shutil.rmtree("master_ttf") +try: + shutil.rmtree("instance_ufo") +except Exception as e: + print(e) +try: + shutil.rmtree("master_ufo") +except Exception as e: + print(e) +try: + shutil.rmtree("master_ttf") +except Exception as e: + print(e) try: if sys.argv[1] == "--autohinting":