diff --git a/asu/build.py b/asu/build.py index f99fff4f..eb4a6b7b 100644 --- a/asu/build.py +++ b/asu/build.py @@ -396,7 +396,7 @@ def download_file(filename: str, dest: str = None): job.connection.hdel( f"worker:{job.worker_name}:last_build", target_subtarget ) - if cache / target_subtarget: + if (cache / target_subtarget).exists(): rmtree(cache / target_subtarget) else: log.debug("Keeping ImageBuilder for %s", target_subtarget)