File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def rmTarball():
23
23
os .unlink ( tarball )
24
24
25
25
def fetch ():
26
- """ fetch tarball from pythia.org """
26
+ """ fetch tarball from pythia.org or smodels.github.io """
27
27
ver = getVersion ()
28
28
tarball = f"pythia{ ver } .tgz"
29
29
if os .path .exists ( tarball ):
@@ -43,7 +43,14 @@ def fetch():
43
43
if r .status_code != 200 :
44
44
print ( f"[installer.py] could not fetch tarball: { r .reason } ." )
45
45
rmTarball ()
46
- sys .exit (- 1 )
46
+ url = f"http://smodels.github.io/downloads/tarballs/"
47
+ print ( f"[installer.py] trying to fetch { tarball } from { url } " )
48
+ path = os .path .join ( url , tarball )
49
+ r = requests .get ( path , stream = True )
50
+ if r .status_code != 200 :
51
+ print ( f"[installer.py] could not fetch tarball: { r .reason } ." )
52
+ rmTarball ()
53
+ sys .exit (- 1 )
47
54
with open ( tarball , "wb" ) as f :
48
55
shutil .copyfileobj ( r .raw , f )
49
56
f .close ()
You can’t perform that action at this time.
0 commit comments