update_request.py 597 B

1234567891011121314151617181920212223
  1. # THIS FILE IS A PART OF VCStudio
  2. # PYTHON 3
  3. import urllib3
  4. # This file requests a update from the GITHUB reposytory containing the update
  5. # information.
  6. filepath = "https://notabug.org/jyamihud/VCStudio/raw/master/settings/update.data"
  7. # Those 3 lines basically retrieve the file from the internet and output them
  8. # to the console. Which I'm catching in the update_reader.py using a Pipe.
  9. try:
  10. http = urllib3.PoolManager()
  11. resp = http.request('GET', filepath)
  12. print(resp.data.decode('utf-8'))
  13. except:
  14. data = open("settings/update.data")
  15. print(data.read())
  16. print("END")