It's ok if the directory doesn't exist
Some checks failed
build

This commit is contained in:
Jake Howard 2023-03-26 20:01:41 +01:00
parent 72dea02735
commit 5aa0fddb9b
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -23,7 +23,11 @@ def download_file(url: str):
def main(): def main():
try:
rmtree(OUTPUT_DIR) rmtree(OUTPUT_DIR)
except FileNotFoundError:
pass
OUTPUT_DIR.mkdir(exist_ok=True) OUTPUT_DIR.mkdir(exist_ok=True)
logo = download_file(f"{GITEA_ROOT}/assets/img/logo.svg") logo = download_file(f"{GITEA_ROOT}/assets/img/logo.svg")