From 3f910ebcba4633d7f7de5d7de18f738db117b850 Mon Sep 17 00:00:00 2001 From: albertosottile Date: Thu, 31 May 2018 16:53:09 +0200 Subject: [PATCH] Check for Python version newer than 3.5 --- syncplayClient.py | 12 ++++++------ syncplayServer.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/syncplayClient.py b/syncplayClient.py index a414f89..6ad0b89 100755 --- a/syncplayClient.py +++ b/syncplayClient.py @@ -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 diff --git a/syncplayServer.py b/syncplayServer.py index ef9ae95..7cc3ac6 100755 --- a/syncplayServer.py +++ b/syncplayServer.py @@ -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