Skip to content

Commit a307845

Browse files
more readable
1 parent 8f74c5d commit a307845

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: nipype/pipeline/engine/nodes.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -822,9 +822,8 @@ def update(self, **opts):
822822
self.inputs.update(**opts)
823823

824824
def is_gpu_node(self):
825-
return (hasattr(self.inputs, 'use_cuda') and self.inputs.use_cuda) or (
826-
hasattr(self.inputs, 'use_gpu') and self.inputs.use_gpu
827-
)
825+
return bool(getattr(self.inputs, 'use_cuda', False)) or bool(
826+
getattr(self.inputs, 'use_gpu', False))
828827

829828

830829
class JoinNode(Node):

0 commit comments

Comments
 (0)