resolve SSL errors with wget.download after compiling
This commit is contained in:
parent
9ca75600bd
commit
e337495d1c
11
installer.py
11
installer.py
@ -16,8 +16,8 @@
|
|||||||
# -----------------import dependencies----------------------
|
# -----------------import dependencies----------------------
|
||||||
|
|
||||||
|
|
||||||
import wget; import os; import platform; import time ; import sys
|
import wget; import os; import platform;
|
||||||
|
import time; import sys; import certifi
|
||||||
import shutil; import tarfile
|
import shutil; import tarfile
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -170,6 +170,10 @@ os.mkdir(str("mods"))
|
|||||||
|
|
||||||
# download mod archive from git repo and extract
|
# download mod archive from git repo and extract
|
||||||
print("Fetching mods...")
|
print("Fetching mods...")
|
||||||
|
|
||||||
|
os.environ['SSL_CERT_FILE'] = certifi.where()
|
||||||
|
# this line fixes SSL errors after compiling with PyInstaller as long as certifi is imported alongside it
|
||||||
|
|
||||||
try:
|
try:
|
||||||
wget.download('https://git.sarushinobie.dev/saru/family-minecraft-modpack/releases/download/0.0.1/mods.tar.gz')
|
wget.download('https://git.sarushinobie.dev/saru/family-minecraft-modpack/releases/download/0.0.1/mods.tar.gz')
|
||||||
# this is insane. `wget` the fucking goat. who knew windows package manager was so cool?
|
# this is insane. `wget` the fucking goat. who knew windows package manager was so cool?
|
||||||
@ -179,13 +183,14 @@ except:
|
|||||||
extract_tar('mods.tar.gz', 'mods')
|
extract_tar('mods.tar.gz', 'mods')
|
||||||
# ('tarfile', 'directory to extract to')
|
# ('tarfile', 'directory to extract to')
|
||||||
|
|
||||||
print("sigma!")
|
print(); print("sigma!")
|
||||||
print("all done!")
|
print("all done!")
|
||||||
print("This window will exit and close in ten seconds. :)")
|
print("This window will exit and close in ten seconds. :)")
|
||||||
time.sleep(9)
|
time.sleep(9)
|
||||||
print_ascii_art()
|
print_ascii_art()
|
||||||
# print boykisser to console
|
# print boykisser to console
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
sys.exit
|
||||||
|
|
||||||
|
|
||||||
# --------------------the real shit!------------------------
|
# --------------------the real shit!------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user