Skip to content

Commit 1a76e34

Browse files
authored
Merge pull request #1048 from DimitriPapadopoulos/lgtm_illegal_raise
FIX: Return error codes in dicomfs, rather than raise
2 parents 75af371 + 497b189 commit 1a76e34

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)