Use feature detection instead of version detection

Follows the Python porting best practice [__use feature detection instead of version detection__](https://docs.python.org/3/howto/pyporting.html#use-feature-detection-instead-of-version-detection).
pull/101/head
cclauss 6 years ago committed by GitHub
parent ec38172b3d
commit 378bb75bf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,9 +30,12 @@ from myException.ticketIsExitsException import ticketIsExitsException
from myException.ticketNumOutException import ticketNumOutException from myException.ticketNumOutException import ticketNumOutException
from myUrllib.httpUtils import HTTPClient from myUrllib.httpUtils import HTTPClient
from utils.timeUtil import time_to_minutes, minutes_to_time from utils.timeUtil import time_to_minutes, minutes_to_time
if sys.version_info.major == 2:
try:
reload(sys) reload(sys)
sys.setdefaultencoding('utf-8') sys.setdefaultencoding('utf-8')
except NameError:
pass
class select: class select:

Loading…
Cancel
Save