Exception when not running Python 2.7

This commit is contained in:
Et0h 2014-06-19 19:31:49 +01:00
parent ea9f32b461
commit 99b5ccda05
2 changed files with 16 additions and 2 deletions

View File

@ -1,9 +1,16 @@
#!/usr/bin/env python
import site
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!")
from syncplay.clientManager import SyncplayClientManager
from syncplay.utils import blackholeStdoutForFrozenWindow

View File

@ -1,10 +1,17 @@
#!/usr/bin/env python
#coding:utf8
import site
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!")
from twisted.internet import reactor
from syncplay.server import SyncFactory, ConfigurationGetter