We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 198d903 commit 33f6774Copy full SHA for 33f6774
nibabel/openers.py
@@ -13,11 +13,19 @@
13
import gzip
14
import sys
15
from os.path import splitext
16
+from distutils.version import StrictVersion
17
-# is indexed_gzip present?
18
+# is indexed_gzip present and modern?
19
try:
- from indexed_gzip import SafeIndexedGzipFile
20
+ from indexed_gzip import SafeIndexedGzipFile, __version__ as version
21
+
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))
25
26
+ del version
27
HAVE_INDEXED_GZIP = True
28
29
except ImportError:
30
HAVE_INDEXED_GZIP = False
31
0 commit comments