Skip to content

Commit af07868

Browse files
committed
BF - move imgs outside try loop to avoid potential undefined error in finally section
1 parent 903f63b commit af07868

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/tests/test_filehandles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ def test_multiload():
3636
return
3737
arr = np.arange(24).reshape((2,3,4))
3838
img = Nifti1Image(arr, np.eye(4))
39+
imgs = []
3940
try:
4041
tmpdir = mkdtemp()
4142
fname = pjoin(tmpdir, 'test.img')
4243
save(img, fname)
43-
imgs = []
4444
for i in range(N):
4545
imgs.append(load(fname))
4646
finally:

0 commit comments

Comments
 (0)