File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 12
12
import bz2
13
13
import gzip
14
14
import sys
15
+ import warnings
15
16
from os .path import splitext
16
17
from distutils .version import StrictVersion
17
18
18
19
# is indexed_gzip present and modern?
19
20
try :
20
21
from indexed_gzip import SafeIndexedGzipFile , __version__ as version
21
22
22
- if StrictVersion (version ) < StrictVersion ("0.6.0" ):
23
- raise ImportError ('indexed_gzip is present, but too old '
24
- '(>= 0.6.0 required): {})' .format (version ))
23
+ HAVE_INDEXED_GZIP = True
24
+
25
+ if StrictVersion (version ) < StrictVersion ('0.6.0' ):
26
+ warnings .warn ('indexed_gzip is present, but too old '
27
+ '(>= 0.6.0 required): {})' .format (version ))
28
+ HAVE_INDEXED_GZIP = False
25
29
26
30
del version
27
- HAVE_INDEXED_GZIP = True
28
31
29
32
except ImportError :
30
33
HAVE_INDEXED_GZIP = False
You can’t perform that action at this time.
0 commit comments