Skip to content

Commit fb04e5d

Browse files
committed
fix rebase mess
1 parent 6d3d3e4 commit fb04e5d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

niworkflows/interfaces/gradunwarp.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
SimpleInterface
3030
)
3131

32+
has_gradunwarp = False
33+
try:
34+
from gradunwarp.core.gradient_unwarp import GradientUnwarpRunner
35+
has_gradunwarp = True
36+
except ImportError:
37+
pass
38+
3239

3340
class _GradUnwarpInputSpec(TraitedSpec):
3441
infile = File(exists=True, mandatory=True, desc="input image to be corrected")
@@ -63,7 +70,9 @@ class GradUnwarp(SimpleInterface):
6370

6471
def _run_interface(self, runtime):
6572

66-
from gradunwarp.core.gradient_unwarp import GradientUnwarpRunner
73+
if not has_gradunwarp:
74+
raise RuntimeError('missing gradunwarp dependency')
75+
6776
gur = GradientUnwarpRunner(self.inputs)
6877
gur.run()
6978
gur.write()

niworkflows/interfaces/tests/test_bids.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,7 @@ def test_DerivativesDataSink_build_path(
300300
**entities,
301301
)
302302

303-
<<<<<<< HEAD
304303
if isinstance(expectation, type):
305-
=======
306-
if type(expectation) is type(Exception):
307-
>>>>>>> 601d1d1f (fix flake8 tests)
308304
with pytest.raises(expectation):
309305
dds.run()
310306
return

0 commit comments

Comments
 (0)