fix install
This commit is contained in:
parent
d5988bb292
commit
9155343c5b
1 changed files with 2 additions and 1 deletions
3
install
3
install
|
@ -45,6 +45,7 @@ class Install(Thread):
|
||||||
self.status['size'] = 0
|
self.status['size'] = 0
|
||||||
package_tar = release['modules'][module]['name']
|
package_tar = release['modules'][module]['name']
|
||||||
url = self.url(package_tar)
|
url = self.url(package_tar)
|
||||||
|
package_tar = os.path.join(self.target, package_tar)
|
||||||
self.download(url, package_tar)
|
self.download(url, package_tar)
|
||||||
tar = tarfile.open(package_tar)
|
tar = tarfile.open(package_tar)
|
||||||
tar.extractall()
|
tar.extractall()
|
||||||
|
@ -92,7 +93,7 @@ class Install(Thread):
|
||||||
|
|
||||||
def download(self, url, filename):
|
def download(self, url, filename):
|
||||||
makefolder(filename)
|
makefolder(filename)
|
||||||
print(filename)
|
print(os.path.basename(filename))
|
||||||
with open(filename, 'wb') as f:
|
with open(filename, 'wb') as f:
|
||||||
with closing(urlopen(url)) as u:
|
with closing(urlopen(url)) as u:
|
||||||
size = int(u.headers.get('content-length', 0))
|
size = int(u.headers.get('content-length', 0))
|
||||||
|
|
Loading…
Reference in a new issue