Skip to content

Commit dff5e28

Browse files
committed
Merge pull request #3735 from cpcloud/fix-travis-bug
BUG/BLD: pytables version checking was incorrect
2 parents 3eacc9f + 336d9b5 commit dff5e28

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pandas/io/pytables.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,12 @@ def _tables():
109109
global _table_supports_index
110110
if _table_mod is None:
111111
import tables
112+
from distutils.version import LooseVersion
112113
_table_mod = tables
113114

114115
# version requirements
115-
ver = tables.__version__.split('.')
116-
try:
117-
if int(ver[0]) >= 2 and int(ver[1][0]) >= 3:
118-
_table_supports_index = True
119-
except:
120-
pass
116+
ver = tables.__version__
117+
_table_supports_index = LooseVersion(ver) >= '2.3'
121118

122119
return _table_mod
123120

0 commit comments

Comments
 (0)