Skip to content

Commit

Permalink
fix a bug. use sys.version_info.major can't be used in Python2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fxsjy committed Jul 29, 2013
1 parent 0f972df commit ed1fa64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jieba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def enable_parallel(processnum):
global pool,cut,cut_for_search
if os.name=='nt':
raise Exception("jieba: parallel mode only supports posix system")
if sys.version_info.major==2 and sys.version_info.minor<6:
if sys.version_info[0]==2 and sys.version_info[1]<6:
raise Exception("jieba: the parallel feature needs Python version>2.5 ")
from multiprocessing import Pool,cpu_count
if processnum==None:
Expand Down

0 comments on commit ed1fa64

Please sign in to comment.