From 19f552bd31e1cbdea18d1e2526491b6a1a1a3c19 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 2 Dec 2015 16:30:17 +0100 Subject: [PATCH] extra check pyOpenSSL on Ubuntu --- install | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/install b/install index 6ed30ae..5c6075e 100755 --- a/install +++ b/install @@ -9,9 +9,6 @@ import tarfile from urllib.request import urlopen from threading import Thread import subprocess -if sys.platform.startswith('linux'): - import platform - def makefolder(path): dirname = os.path.dirname(path) @@ -148,6 +145,18 @@ if __name__ == '__main__': if os.path.exists(target): print('%s exists, remove it before re-installing Open Media Library' % target) sys.exit(1) + + if sys.platform.startswith('linux'): + import platform + distro = platform.linux_distribution() + if distro[0] == 'Ubuntu' and distro[1] < '14.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\n\tsudo pip3 install pyOpenSSL") + sys.exit(1) + install = Install(target) install.join() subprocess.call([os.path.join(target, 'ctl'), 'open'])