Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9383 → Rev 9384

/_tools/lib/network.py
2,12 → 2,10
import urllib.request
from .logging import log
 
def download(link, path):
def download(link, path, skip_exist = False):
if skip_exist and os.path.exists(path):
return
log(f"Downloading {path}... ", end = "")
urllib.request.urlretrieve(link, path)
log("Done.")
 
def download_if_not_exist(link, path):
if not os.path.exists(path):
download(link, path)