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 f5cb431 commit 8e5e52eCopy full SHA for 8e5e52e
nibabel/cmdline/dicomfs.py
@@ -16,7 +16,18 @@
16
import time
17
import locale
18
import logging
19
-import fuse
+
20
21
+class dummy_fuse(object):
22
+ """Dummy fuse "module" so that nose does not blow during doctests"""
23
+ Fuse = object
24
25
26
+try:
27
+ import fuse
28
+except ImportError:
29
+ fuse = dummy_fuse
30
31
import nibabel as nib
32
import nibabel.dft as dft
33
@@ -46,6 +57,9 @@ def __str__(self):
46
57
class DICOMFS(fuse.Fuse):
47
58
48
59
def __init__(self, *args, **kwargs):
60
+ if fuse is dummy_fuse:
61
+ raise RuntimeError(
62
+ "fuse module is not available, install it to use DICOMFS")
49
63
self.followlinks = kwargs.pop('followlinks', False)
50
64
fuse.Fuse.__init__(self, *args, **kwargs)
51
65
self.fhs = {}
0 commit comments