Skip to content

Commit 497b189

Browse files
FIX: LGTM error: Illegal raise
Illegal class 'int' raised; will result in a TypeError being raised instead.
1 parent 75af371 commit 497b189

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nibabel/cmdline/dicomfs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ def open(self, path, flags):
172172
elif isinstance(matched_path, tuple):
173173
self.fhs[i] = matched_path[1]()
174174
else:
175-
raise -errno.EFTYPE
175+
return -errno.EFTYPE
176176
return FileHandle(i)
177-
raise -errno.ENFILE
177+
return -errno.ENFILE
178178

179179
# not done
180180
def read(self, path, size, offset, fh):

0 commit comments

Comments
 (0)