Check for Python version newer than 3.5

This commit is contained in:
albertosottile 2018-05-31 16:53:09 +02:00
parent 7fc3a0bb77
commit 3f910ebcba
2 changed files with 12 additions and 12 deletions

View File

@ -4,12 +4,12 @@ import site, sys
# libpath
# try:
# if (sys.version_info.major != 2) or (sys.version_info.minor < 7):
# raise Exception("You must run Syncplay with Python 2.7!")
# except AttributeError:
# import warnings
# warnings.warn("You must run Syncplay with Python 2.7!")
try:
if (sys.version_info.major != 3) or (sys.version_info.minor < 5):
raise Exception("You must run Syncplay with Python 3.5 or newer!")
except AttributeError:
import warnings
warnings.warn("You must run Syncplay with Python 3.5 or newer!")
from syncplay.clientManager import SyncplayClientManager
from syncplay.utils import blackholeStdoutForFrozenWindow

View File

@ -5,12 +5,12 @@ import site, sys
# libpath
# try:
# if (sys.version_info.major != 2) or (sys.version_info.minor < 7):
# raise Exception("You must run Syncplay with Python 2.7!")
# except AttributeError:
# import warnings
# warnings.warn("You must run Syncplay with Python 2.7!")
try:
if (sys.version_info.major != 3) or (sys.version_info.minor < 5):
raise Exception("You must run Syncplay with Python 3.5 or newer!")
except AttributeError:
import warnings
warnings.warn("You must run Syncplay with Python 3.5 or newer!")
from twisted.internet import reactor