Skip to content

Commit b4cb3a6

Browse files
committed
Fix a bug related to tri file mode detection for ASCII files
1 parent 7802539 commit b4cb3a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cape/gruvoc/trifile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ def get_tri_mode_fname(
488488
fmt: Optional[str] = None) -> TriFileType:
489489
# Get format
490490
fmt_fname = _get_tri_mode_fname(fname, fmt)
491+
# Check for invalid mode
492+
fmt_fname = "ascii" if fmt_fname not in DATA_FORMATS else fmt_fname
491493
# Check for ASCII
492494
if fmt_fname == "ascii":
493495
return TriFileType("ascii", None, None, None, None)

0 commit comments

Comments
 (0)