Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. import os
  2.  
  3. from .network import download
  4. from .constants import tools_cache
  5.  
  6. def builds_get(path):
  7.     url = f"http://builds.kolibrios.org/{path}"
  8.     output_path = f"{tools_cache}/builds.kolibrios.org/{path}"
  9.     output_dir = os.path.dirname(output_path)
  10.     os.makedirs(output_dir, exist_ok = True)
  11.     download(url, output_path, skip_exist = True)
  12.     return output_path
  13.  
  14. def builds_get_contents(path):
  15.     output_path = builds_get(path)
  16.     with open(output_path, "rb") as f:
  17.         return f.read()
  18.  
  19.