tripple check for TLSv1_2_METHOD

This commit is contained in:
j 2016-01-16 17:19:46 +05:30
parent 34348de2a8
commit 8de3c08cea
1 changed files with 4 additions and 3 deletions

View File

@ -31,12 +31,12 @@ class Install(Thread):
if sys.platform.startswith('linux'):
import platform
distro = platform.linux_distribution()
if distro[0] == 'Ubuntu' and distro[1] < '14.10':
if distro[0] == 'Ubuntu' and distro[1] < '15.10':
try:
from OpenSSL.SSL import TLSv1_2_METHOD
except:
print("Open Media Library currently only works on Ubuntu 14.10 and later")
print("You can also install a current version of pyOpenSSL:\n\tsudo apt-get install python3-pip python3-dev libffi-dev\n\tsudo pip3 install pyOpenSSL")
print("To run Open Media Library on versions of Ubuntu before 15.10 you need to manually update pyOpenSSL")
print("To install the current version of pyOpenSSL:\n\tsudo apt-get install python3-pip python3-dev libffi-dev\n\tsudo pip3 install pyOpenSSL")
self.failed = True
return
apt_packages = ''
@ -60,6 +60,7 @@ class Install(Thread):
dnf_packages += ' webkitgtk4'
try:
import OpenSSL
from OpenSSL.SSL import TLSv1_2_METHOD
except:
apt_packages += ' python3-openssl'
dnf_packages += ' python3-pyOpenSSL'