Skip to content

Commit 95b37d2

Browse files
Merge pull request #964 from mperrin/alias_get_webbpsf_data_path
add back-compatibility alias for get_webbpsf_data_path
2 parents 2df8622 + 288bea4 commit 95b37d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

webbpsf/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@
3636

3737
sys.modules["webbpsf"] = stpsf
3838
os.environ["STPSF_PATH"] = os.environ.get("WEBBPSF_PATH", "")
39+
40+
# Add a back-compatibility alias for a function whose name changed during the migration
41+
# This prevents failure of legacy code calls to webbpsf.utils.get_webbpsf_data_path()
42+
stpsf.utils.get_webbpsf_data_path = stpsf.utils.get_stpsf_data_path

0 commit comments

Comments
 (0)