mirror of https://github.com/testerSunshine/12306
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
parent
ec38172b3d
commit
378bb75bf8
|
@ -30,9 +30,12 @@ from myException.ticketIsExitsException import ticketIsExitsException
|
|||
from myException.ticketNumOutException import ticketNumOutException
|
||||
from myUrllib.httpUtils import HTTPClient
|
||||
from utils.timeUtil import time_to_minutes, minutes_to_time
|
||||
if sys.version_info.major == 2:
|
||||
|
||||
try:
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf-8')
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
|
||||
class select:
|
||||
|
|
Loading…
Reference in New Issue