more linux install

This commit is contained in:
j 2016-01-17 12:14:08 +05:30
commit 9fcd9491ac
2 changed files with 11 additions and 2 deletions

View file

@ -47,6 +47,13 @@ class Install(Thread):
except:
apt_packages += ' python3.4 python3-pil python3-lxml'
dnf_packages += ' python3-pillow python3-lxml'
try:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GLib
except:
apt_packages += ' gir1.2-gtk-3.0'
#dnf_packages += ' webkitgtk4'
try:
import OpenSSL
from OpenSSL.SSL import TLSv1_2_METHOD
@ -114,7 +121,7 @@ class Install(Thread):
def download(self, url, filename):
makefolder(filename)
print(os.path.basename(filename))
print('downloading',os.path.basename(filename))
with open(filename, 'wb') as f:
with closing(urlopen(url)) as u:
size = int(u.headers.get('content-length', 0))