Skip to content

Commit d7d79fd

Browse files
committed
Merge branch 'main' into uw-657-file-mkdir
2 parents dfca65a + 448318f commit d7d79fd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/uwtools/utils/file.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from typing import IO, Any, Generator, Optional, Union
1212

1313
from uwtools.exceptions import UWError
14-
from uwtools.logging import log
1514
from uwtools.strings import FORMAT
1615

1716

@@ -52,10 +51,9 @@ def get_file_format(path: Path) -> str:
5251
suffix = Path(path).suffix.replace(".", "")
5352
try:
5453
return FORMAT.formats()[suffix]
55-
except KeyError as e:
54+
except KeyError:
5655
msg = f"Cannot deduce format of '{path}' from unknown extension '{suffix}'"
57-
log.critical(msg)
58-
raise UWError(msg) from e
56+
raise UWError(msg) from None
5957

6058

6159
def path_if_it_exists(path: str) -> str:

0 commit comments

Comments
 (0)