use os.path.join
dl / lint (push) Successful in 1m28s Details
dl / docker (push) Successful in 45s Details

This commit is contained in:
Michel Roux 2023-10-02 11:57:11 +02:00
parent a41f88d6b6
commit bd7d25ff97
1 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ def download(path, file):
)
except subprocess.CalledProcessError:
print(f"Removing {path}/{file}")
os.remove(f"{path}/{file}")
os.remove(os.path.join(path, file))
print("Waiting for 10 minutes ...")
time.sleep(10 * 60)
download(path, file)
@ -78,11 +78,11 @@ def remove(path):
to_remove = []
for name in os.listdir(path):
if os.path.isfile(f"{path}/{name}"):
if os.path.isfile(os.path.join(path, name)):
id = get_title_shortid(name)
if not id:
to_remove.append(f"{path}/{name}")
to_remove.append(os.path.join(path, name))
if len(to_remove) > 100:
print("Too much to delete:")