We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GiftiImage
1 parent ea68c4e commit 08ccd0bCopy full SHA for 08ccd0b
nibabel/gifti/gifti.py
@@ -877,8 +877,8 @@ def to_file_map(self, file_map=None):
877
"""
878
if file_map is None:
879
file_map = self.file_map
880
- f = file_map['image'].get_prepare_fileobj('wb')
881
- f.write(self.to_xml())
+ with file_map['image'].get_prepare_fileobj('wb') as f:
+ f.write(self.to_xml())
882
883
@classmethod
884
def from_file_map(klass, file_map, buffer_size=35000000, mmap=True):
0 commit comments