Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Jan 21, 2024
1 parent 53e9aad commit 2abdbab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xarray/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,12 @@ def find_stack_level(test_mode=False) -> int:
pkg_dir = Path(xr.__file__).parent
test_dir = pkg_dir / "tests"

std_lib_dir = Path(sys.modules["os"].__file__).parent # Standard library path
std_lib_path = sys.modules["os"].__file__
# Mostly to appease mypy; I don't think this can happen...
if std_lib_path is None:
return 0

std_lib_dir = Path(std_lib_path).parent # Standard library path

frame = inspect.currentframe()
n = 0
Expand Down

0 comments on commit 2abdbab

Please sign in to comment.