Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modmesh/track/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def read_from_text_file(
:return: None
"""

if isinstance(fname, str):
import pathlib
if isinstance(fname, str) or isinstance(fname, pathlib.PosixPath):
if not os.path.exists(fname):
raise Exception("Text file '{}' does not exist".format(fname))
fid = open(fname, 'rt')
Expand Down
Loading