Skip to content

Commit a534f47

Browse files
committed
MAINT: possibly_open_file
1 parent ddbdc1f commit a534f47

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

refellips/dataSE.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def open_M2000file(fname, take_every=1, dropdatapoints=1):
584584
mode = None
585585
metadata = {}
586586

587-
with open(fname, mode="r") as file:
587+
with possibly_open_file(fname, mode="r") as file:
588588
file.readline() # Skip the blank first line
589589
firstline = file.readline()[:-1]
590590
secondline = file.readline()[:-1]
@@ -624,7 +624,7 @@ def open_M2000file(fname, take_every=1, dropdatapoints=1):
624624

625625
def _open_M2000file_standard(fname, dropdatapoints=1, metadata={}, skiplines=3):
626626
data = []
627-
with open(fname, mode="r") as file:
627+
with possibly_open_file(fname, mode="r") as file:
628628
for i in range(skiplines):
629629
file.readline()
630630

@@ -727,7 +727,7 @@ def open_FilmSenseFile(fname):
727727
728728
Metadata contained within the file is stored in DataSE.metadata.
729729
"""
730-
with open(fname, "r") as f:
730+
with possibly_open_file(fname, "r") as f:
731731
header = f.readline()
732732
if header == "Film_Sense_Data\n":
733733
return _open_FilmSenseFile_standard(f)

0 commit comments

Comments
 (0)